Posts

Showing posts with the label force log out users

Kicking out a logged in user in Linux

Another thing that I never did before. Suppose, you have a system and there are currently logged in users that you want to terminate. The easiest way to check for logged in users is: [root@busy-bee log]# w  13:06:51 up  1:24,  2 users,  load average: 1.15, 1.10, 1.15 USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT sarmed   pts/0    192.168.1.6      12:36    0.00s  0.06s  0.03s sshd: sarmed mujahid  pts/1    192.168.2.9      11:48    1:17m  1:03m  0.04s sshd: mujahid Now,suppose, I want to terminate the session for user mujahid. This is how it is done- [root@busy-bee log]# pkill -KILL -u mujahid [root@busy-bee log]# w  13:08:47 up  1:26, ...