Search Suggest

who and whoami command in linux

 

Who command – This command shows information about all users who are currently logged in to system.

whoami command - This command show the information about current terminal logged user name.

which – This command show the absolute path of any command

Get information about all logged in user

# who

Get informaiton about who logged in and when system last reboot

# who -a

system boot 2020-12-26 17:31

run-level 5 2020-12-26 17:32

devteam ? :0 2020-12-26 17:32 ? 2713 (:0)

shahzad + pts/2 2020-12-26 22:52 00:05 16625 (192.168.0.7)


Check last system reboot time using who command

# who -b

system boot 2020-12-26 17:31

Check system running wih wich runlevel

# who -r

run-level 5 2020-12-26 17:32


check current logged in terminal user

# whoami


Check command executable path

# which who

/usr/bin/who

# which ls

/bin/ls

Đăng nhận xét