How to kill all process of a Linux user

There will situation comes when you want to kill all applications running by an user. In this tutorial I will show, how to kill all process running by an user. There are several ways to do the same I will describe few of them.

Option One:

Option one, to kill all the process by feeding the process ID to the command KILL generated by using command “ ps

The above command will kill all the process runing by the user “tapas”.

Option Two:

Also we can use pgrep command to look up the process based on user name

The above command will search the PID of the process based on the user name “tapas”

Option Three:

The command pkill can be use to kill all process by user name

Option Four:

The command killall is similar to the command pkill and can be used to kill all process by user name.

The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply