[Ilugc] Re: One Day One GNU/Linux Command (WHO)

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Mon Jun 16 13:49:21 2008

On 13:10:10 Jun 16, Rajesh Prabhu G wrote:

Hi Bharathi,

I like to share my understanding about ( who ) command... pls check the
following

[rajesh@server2 ~]$ sudo bash
Password:
[root@server2 ~]# whoami
root
[root@server2 ~]# who am i
rajesh   pts/0        Jun 16 13:04 (192.168.1.48)
[root@server2 ~]#

Please find the difference between "whoami" & "who am i"
whoami - shows the current logged in user
who am i - shows from which user we switched off.

whoami(1) is different from the who(1) command.

It might be ignoring the arguments "am i". 

-Girish

Other related posts: