Friday, 28 February 2014

Linux: List all Users

Linux: List all Users

cat /etc/passwd |grep "/home" |cut -d: -f1

If the user is not in the /home directory, this will not show.

If you want to get all Users:
cat /etc/passwd |grep "/" |cut -d: -f1
Reference
linuxquestions.org

#bearMan