Admin-Ahead Community

Linux => General Linux => Topic started by: jominj on January 20, 2014, 05:52:11 am

Title: Use skill command to kill and logout users
Post by: jominj on January 20, 2014, 05:52:11 am
The skill command in Linux can send signals to users and process. Using the skill command we can halt a user terminal or can logout him. But keep in mind that you should be root to stop other users.

To halt/stop a user called test
Send STOP signal to user test, type the following command:
Code: [Select]
# skill -STOP -u test
To resume already halted user called test
Send CONT signal to user test, type the following command:
Code: [Select]
# skill -CONT -u test
To kill and logout user called test
You can send KILL signal, type the following command:
Code: [Select]
# skill -KILL -u test

To kill and logout all users, type the following command:
Code: [Select]
# skill -KILL -v /dev/pts/*