How to list all users in Linux

To list all users in linux:

cat /etc/passwd | cut -d”:” -f1

To find the total number of accounts in linux

cat /etc/passwd | wc -l

Leave a Reply

Close Menu
%d bloggers like this: