List Only Usernames

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gabriel9999
    New Member
    • Jul 2019
    • 15

    List Only Usernames

    Iwant to list only users names in a Linux system byusing the /etc/passwd file.
  • SioSio
    Contributor
    • Dec 2019
    • 272

    #2
    Code:
    $ cut -d: -f1 /etc/passwd
    $ cat /etc/passwd | sed -e 's/:.*//g'
    $ awk -F":" '{ print $1 }' /etc/passwd
    Use one of three command lines.
    If you want to show in each page of the screen, add "| more".

    Comment

    Working...