linux view and close-to-end system login

Lists the user currently logged on to the system

who

root@ubuntu:/# who  
root     pts/0       2017-03-01 09:51 (192.168.3.151)  
root     pts/1       2017-03-01 18:27 (192.168.3.129)  
root     pts/2       2017-03-01 18:27 (192.168.3.144)  
root     pts/3       2017-03-01 18:27 (192.168.3.151)  

Close to a user logged into the system

fuser -k / dev / pts / User ID

root@ubuntu:/# fuser -k /dev/pts/3   /dev/pts/3:          9339

View the current logged-on user

tty

root@ubuntu:/# tty  
/dev/pts/1 
Published 21 original articles · won praise 5 · views 10000 +

Guess you like

Origin blog.csdn.net/icodestechnology/article/details/90055637