Jump to Navigation

174 - Kill User Session

1. To kill a specific user session :

# who --all

# ps -ef | grep 5304

# kill -9 5304

2. To kill a process :

# pgrep -f 'zsh'

# pgrep -f 'process name' | xargs kill

3.To kill gnome sesssion :

# gnome-session-save [--kill] [--gui]

You can specify the "--kill" argument to terminate the GNOME session.
The "--gui" argument will show a dialog when the session is saved, and report errors in dialog boxes instead of printing to stderr.

4. skill command :

Send a signal to process.

* Halt / Stop user :
# skill -STOP -u user1

* Send CONT single to user1, type the following command:
# skill -CONT -u user1

* kill a specific user :
# skill -KILL -u user1

* Kill all users :
# skill -KILL -v /dev/pts/*

 

Linux:


Main menu 2

Story | by Dr. Radut