How To List All Users or Groups in Linux

To list all users in Linux:

1
cat /etc/passwd

See only the first word before double colon (:)
for exampple, user “root” will look like: root:x:0:0:root:/root:/bin/bash

And to list all groups do the following

1
cat /etc/group
This entry was posted in Linux, Operating System. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


+ six = 14