Logout Users
You may need to terminate user sessions and log them off. All user login sessions are associated with a terminal device (TTY). Use the w command to establish user logins and currently running processes.
w
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.122.1 07:29 3.00s 0.02s 0.00s w
johndoe pts/1 192.168.122.1 09:08 8.00s 0.00s 0.00s vi sample
In this example, the user johndoe can be kicked off the server using the pkill command.
Summary
User sessions can be terminated by system administrators using the pkill command.
Command References:
pkill, pstree, signal and w.