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

Categories: Miscellaneous

Leave a Reply

%d bloggers like this: