Kill and Logout Users From linux

Open a terminal, and then type the following commands.

Login as root su – or sudo su – and entering the root password. Type the skill command as below:

# w

to show who is log in to your system and then :

# skill -STOP -u username

The skill command sends a terminate command (or another specified signal) to a specified set of processes.

Task: Resume Halted User Called username

Send CONT single to user username, type the following command:

# skill -CONT -u username

Task: Kill and Logout a User Called username

You can send KILL single, type the following command:

# skill -KILL -u username

Task: Kill and Logout All Users

Tto kill and logout all users is as follows:

# skill -KILL -v /dev/pts/*

pkill command

To halt or stop a user called username, enter:

# pkill -STOP -u username

To resume a user called username, enter:

# pkill -CONT -u username

To kill all php-cgi process owned by username user, enter:

# pkill -KILL -u username php-cgi

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s