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.