How To List Users In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. To list all users on a Linux system, open a terminal window and type the following command:
$ cat /etc/passwd
This command will list the usernames of all users on the system.
2. To list only the logged in users, type the following command:
$ who
This command will list the usernames of all currently logged in users.
3. To list only the users that are currently logged in via SSH, type the following command:
$ who -T
This command will list the usernames of all users currently logged in via SSH.