Command function: Display information of logged-in user
Command format:
Common options:
Example:
W shows the logged in user and the operation in progress
[Email protected] ~]# W
11:22:01 up 4 days, 21:22, 3 users, Load average:0.00, 0.00, 0.00
USER TTY from [email protected] IDLE jcpu PCPU
Root tty1-thu14 4days 0.19s 0.19s-bash
Root pts/0 172.31.3.32 Thu14 0.00s 0.73s 0.00s W
Root pts/1 172.31.3.32 11:18 1:50 0.07s 0.02s-bash
Who shows the logged in username, terminal name, logon time, and login IP
[email protected] ~]# who
Root Tty1 2015-11-12 14:00
Root pts/0 2015-11-12 14:03 (172.31.3.32)
Root PTS/1 2015-11-17 11:18 (172.31.3.32)
WHOAMI Displays the user name of the current user
[Email protected] ~]$ WhoAmI
Zzd
Who am I displays the user name when logging on to the system, even if the user has switched to other users
Results with Who-m
[Email protected] ~]$ WhoAmI
Zzd
[email protected] ~]$ who am I
Root PTS/1 2015-11-17 11:18 (172.31.3.32)
[Email protected] ~]$ who-m
Root PTS/1 2015-11-17 11:18 (172.31.3.32)
W, who, WhoAmI, who am I command