Linux Whoami Command Tutorial To Find Current User

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-whoami-command-tutorial-find-current-user/
PINTEREST
PINTEREST
INSTAGRAM

Linux provides different tools to identify current and related users. whoami is one of the command that is used to  display information about the current user.

Print Current User

We can print current user with whoami command like below.

Print Current User 
Print Current User

Use who am i

Another usage option of the whoami command is using it separately. So we can simply write who am i  into the terminal like in English language and we will get detailed information about the current user like below.

Use who am i
Use who am i

Print Version

I know it is not important but we can also print the version of the whoami command with the --version  option like below.

Print Currently Logged In Users

We can also print currently logged in users into a Linux system with w command. This command will also provide information like TTY ofthe user , Login time, idle and CPU usage too.

Print Currently Logged In Users
Print Currently Logged In Users

Omit The Header

While printing currently logged in users we can remove the header part ot the user list. We will use -h option.

Omit The Header 
Omit The Header

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-whoami-command-tutorial-find-current-user/
PINTEREST
PINTEREST
INSTAGRAM
LEARN MORE  How to Create New User In CentOS?