Shell script example to stop execution of all processes with a certain UID? [duplicate]
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite This question already has an answer here: How do I kill all a user's processes using their UID 5 answers I'm new to scripting and I can't seem to find any examples on the internet for this particular task. I'd much appreciate a bit of help. shell scripting uid share | improve this question asked May 27 at 8:01 Amelie 1 marked as duplicate by Romeo Ninov, ilkkachu, G-Man, Jeff Schaller, sourcejedi May 27 at 19:04 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. Try for i in $(pgrep -U $UID); do kill -9 $i; done or pkill -U $UID whichever seems suitable, replace $UID with the required UID or just assign it a value beforehand. â Kunal Gupta May 27 at 8:06 All solutions will require CAP_KILL (permission to kill any process), or to b...