Skip to content

Instantly share code, notes, and snippets.

@hugo53
Created March 9, 2012 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugo53/2005408 to your computer and use it in GitHub Desktop.
Save hugo53/2005408 to your computer and use it in GitHub Desktop.
List all users in linux
cat /etc/passwd | gawk 'FS=":" {print $1}'
gawk -F: '{ print $1 }' /etc/passwd
alias userlist='cat /etc/passwd |grep "/bin/bash" |grep "[5-9][0-9][0-9]" |cut -d: -f1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment