4 commands to identify a logged user account in Linux

4 commands to identify a logged user account in Linux

Into this tutorial we will learn how to identify a user account or who is logged into system with commands like who or who am i.

If multiple users use a single system, then everyone may have their own user account. At this time, it will be helpful to know who is logged in and the user account details.

whoami

To know about the system’s username use the following command.

whoami
image 10 - 4 commands to identify a logged user account in Linux

Check into the above table , ‘stefan’ is our system username.


who

To check the information about the users logged on to the system use the following command.

who
image 11 - 4 commands to identify a logged user account in Linux

w

Using this command we can see about the users who are logged in and what are they doing.

image 12 - 4 commands to identify a logged user account in Linux

id

This command used for to check your user id, primary group id, and a list of groups that belongs to that user.

image 13 - 4 commands to identify a logged user account in Linux
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.