Unix & Linux: Kill all process of users in Ubuntu? (4 Solutions!!)

Unix & Linux: Kill all process of users in Ubuntu? (4 Solutions!!)

Unix & Linux: Kill all process of users in Ubuntu? The Question: How to kill all process of one user? When I make ps aux I obtain a list of process with several users, and I want to kill all process of user name1 for example! What's a command to do that in Ubuntu? Solutions: Please watch the whole video to see all solutions, in order of how many people found them helpful == This solution helped 1 person == Install slay: aptitude install slay Then issue slay some-user. Be aware that if you kill off stuff for users you don't know the purpose for, you may render your machine unusable (until you restart). If you really don't want to install slay: ps -e -o user,pid | grep '^some-user ' | awk '{ print $2 }' | xargs kill (wait a bit) ps -e -o user,pid | grep '^some-user ' | awk '{ print $2 }' | xargs kill -9 == This solution helped 30 people == In this case, it's pretty simple, you can use killall to kill, or send any other signal, to a bunch of processes at once. One of the "filtering" options is the owner: killall --user name1 == This solution helped 2 people == Identify the user, then killall -user <username> They will have a bash (or similar) process associated with their login session killing that will kill their session. To get a potentially better overview of what a user is doing - try pstree <username> With thanks & praise to God, and with thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free... | Images: https://stocksnap.io/license & others | With thanks to user user15992 (https://unix.stackexchange.com/users/..., user SuperBOB (https://unix.stackexchange.com/users/..., user Rui F Ribeiro (https://unix.stackexchange.com/users/..., user Patrick (https://unix.stackexchange.com/users/..., user njsg (https://unix.stackexchange.com/users/..., user jmtd (https://unix.stackexchange.com/users/..., and the Stack Exchange Network (http://unix.stackexchange.com/questio.... Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything is amiss at Roel D.OT VandePaar A.T gmail.com.