Find the answer to your Linux question:
Results 1 to 4 of 4
I'm sure this is an easy one, but for some reason I can't find the command to list all the users of my system? I know users command will give ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    12

    List all user accounts on a system?


    I'm sure this is an easy one, but for some reason I can't find the command to list all the users of my system? I know users command will give me a list of all the users currently logged in, but I want to know ALL users including the ones not logged in .

  2. #2
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    Code:
    less /etc/passwd
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  3. #3
    Just Joined!
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    12
    Yep that works, I've also found a little cleaner way to do it .
    Code:
    cat /etc/passwd | cut -d":" -f1

  4. #4
    Just Joined!
    Join Date
    Jan 2010
    Posts
    1
    Even better way:

    cut -d: -f1 /etc/passwd

    Supported in v8.4 of cut and possibly earlier versions.
    --phar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •