How to list linux users
List users who are currently logged in
users
View users on a linux system
getent passwd
Display a list of all users registerd in the system
cat /etc/passwd
Scroll through the entire /etc/passd
file
less /etc/passwd
List only usernames
awk -F: '{print $1}' /etc/passwd
List logged in users
who
Display list of groups and associated users
cat /etc/group
List groups a user is a member of
groups <username>