Skip to content

Linux Identifying the Current User and all users logged in

Kristina edited this page Nov 15, 2017 · 1 revision

You can use the whoami command in the terminal to identify the current user logged into Linux. whoami command

To get a list of all the users logged into the system you can use the who command.

who command

Using the who -a command will give you more details about the users that are logged into the system.

who -a command

You can also use the id command to get information about groups and permissions that the current user has and view the user’s unique system id.

id command

Every user is assumed a unique user ID (uid). If you look at the screen shot above you will see that my unique id is 1000. Fedora versions of Linux starts uid’s values at 500 and other distributions start at 1000. Each group has a unique ID (gid) assigned to it and each users is assumed to a default group which has the same id number as the users.

Clone this wiki locally