Skip to main content

Linux List Users Command

To list only usernames type the following awk command:
$ awk -F':' '{ print $1}' /etc/passwd

Second Way:
sed 's/:.*//g' /etc/passwd

Third Way:
cut -d: -f1 /etc/passwd

Comments