+4 votes
in Operating Systems by (72.8k points)
edited by
One user has several processes running on a shared machine. I want to kill all running processes of the user. What Linux command should I use to kill processes using his/her user id?

1 Answer

+1 vote
by (355k points)
selected by
 
Best answer

You can use pkill or killall command to kill all processes of a user. When you run these commands, the user will be logged out and all his/her processes will be killed.

E.g.

$ pkill -U UID

$ pkill -u UID

$ killall -u USERNAME


...