It is often helpful to kill all of a specific users processes. This could be because they no longer need their session, or something they are doing is causing hanging. Rather than killing each process one by one it is possible to kill all of them at once by using the pkill command.
pkill -u username
This will gather all process id’s and kill them. The user will lose all connectivity to the host until it is re-established.
Another useful trick you can use is if you just want to kill a specific type of a process you can use the pgrep command to gather all the process id’s of that process
This will grep all the processes that belong to httpd so that you may kill them.
Both of these process management commands are a useful component of linux which makes system management easier.