Commands to Identify Users in Linux

Linux commands are useful applications found in Linux. Commands may be used to do any simple or complicated activity. The commands are run using the Linux terminal. The terminal is a command-line interface for interacting with the system. It is similar to the Windows command prompt. Linux commands are case-sensitive. 

Users of a shared system may each have their own login credentials. For this purpose, knowing the user’s credentials will be useful. In this guide, you will learn how to use the “id, w, who, whoami, and who am I” commands to determine which user account is logged onto a computer.

id

  • The “id” command will provide you with information on your user id, main group id, and a list of the groups to which you belong.
id

w

  • The “w” command provides information on the people that are currently logged in as well as the activities that they are participating in.
w

who

  • The “who” command provides information on the users who are currently signed in to the system.
who

whoami

  • The “whoami” provides information on your username inside the system.
whoami

who am i

  • Only information about the current user is shown by the “who am i” command.
who am i

Feedback

Do you want to provide us with feedback? Provide us with feedback directly at info@elearnbee.com.

Share us:

AD BLOCK 1