Home / Labs / Users and Groups
Users and Groups
Quick answer: Run cat /etc/passwd. Each line is one user. To print just the names, use cut -d: -f1 /etc/passwd or awk -F: '{print $1}' /etc/passwd.
Read /etc/passwd and sort real user accounts from system ones.
Commands practised here
cat /etc/passwdShows all user accounts on the system.grep ':0:' /etc/passwdFinds users with UID 0 (root-level access).awk -F: '{print $1,$3}' /etc/passwdExtracts usernames and UIDs.
Nearby labs
- All labsBrowse the full list.
- Exam prepWhich exams these objectives map to.
- Searching Text
- Where Am I?