How do I list all users in Linux?

How do I list all users in Linux?
Answer
Get a List of All Users using the /etc/passwd File
  • Local user information is stored in the /etc/passwd file.
  • If you want to display only the username you can use either awk or cut commands to print only the first field containing the username:
  • To get a list of all Linux users type the following command:
 

Tìm kiếm

Back
Top