How to check list of users in Unix

https:/‮al.www/‬utturi.com
How to check list of users in Unix

To check the list of users on a Unix system, you can use the cat command to display the contents of the /etc/passwd file. The /etc/passwd file is a system file that stores information about the users on the system, including their login names and user IDs.

To display the list of users using the cat command, open a terminal and enter the following command:

cat /etc/passwd

This will display the contents of the /etc/passwd file, which will look something like this:

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
...

Each line in the /etc/passwd file represents a user on the system, and the fields are separated by colons (:).

Created Time:2017-10-16 14:38:45  Author:lautturi