kill all processes run by a user

From WebHostingNeeds.com
Jump to: navigation, search

To kill all process by a user, run following command. This will be usefull when a user run too much commands and crash the server.

kill -9 `ps -u USERNAME-HERE -o "pid="`

For example, you need to kill all process by user exim, do

kill -9 `ps -u exim -o "pid="`

This can be used to stop all exim processes when some one send too much mails from your server.