List all Users Linux
Just copy the following to a file name “listusers” and move it to the “/usr/bin” folder
gawk -F: ‘{ print $1 }’ /etc/passwd
Then you can run the command %listusers to see all your users without having to remember the command all the time.
Important: Make sure you change the permission on the file to 755.
chmod 755 /usr/bin/listusers