How To List All Users or Groups in Linux

To list all users in Linux:

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

cat /etc/group

Leave a Reply

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


× 4 = twenty