On Ubuntu (or any Linux system), you can view all user accounts in several ways.
1. List all users from /etc/passwd
Or just display the usernames:
Example output:
2. Get all users from the system database
This method also works if users come from LDAP or other authentication services:
To show only usernames:
3. List regular (human) users only
Most system accounts have UIDs below 1000. To show regular users:
Example:
4. See currently logged-in users
Example:
5. Check users with sudo privileges
Members of the sudo group can run administrative commands:
Or:
6. Count total users
7. Display users and their UID/GID
This can help distinguish system users from normal users.
Most commonly used command:
It lists all users known to the Ubuntu system.
No comments:
Post a Comment