Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, Is their any command to find the number of users or all user names in the system. Not only current login user, i am looking all those who ...
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    49

    find number of users

    Hi All,

    Is their any command to find the number of users or all user names in the system.
    Not only current login user, i am looking all those who have account in system.

    I can get directly from /etc/passwd file by viewing, but is their any command to display all user names.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    There isn't any command to list all users but as you already doing, use /etc/passwd file for that. You can check the /home folder too.
    Code:
    cat /etc/passwd | cut -d ":" -f1
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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