Delete all Processes of a Single User Linux

By | July 5, 2008

Sometimes server load is caused by a single user, that runs lots of stuff. In order to prevent server overload you should detect most heavy processes by using ps. Then you may need to know what processes are run by this user. This will be done using ps -u <username>. If you think that al user processes should be terminated, issue the following command: pkill -u username. This will kill only processes started by the specified user.

Here is a flash demo of this command, I think you can find it useful.