Basic Linux Tutorial
Computer Tutorial

User Login Related Commands



User Login Related Commands

who command

The who command will give you information about who is logged on the system.

Synopsis :

$ who

Example :

who command

whoami command

The whoami command tells you your username.

Synopsis :

$ whoami

Example :

whoami command

w command

The w command shows you who is logged on and what they are doing.

Synopsis :

$ w

id command

The id command will give you your user id, primary group id, and a list of the groups that you belong to.

Synopsis :

$ id

Example :

id command

su to another user

The su command allows a user to run a shell as another user.

Synopsis :

$ su user_name

Example :

$ su jiya
$ su root