+4 votes
in Operating Systems by (15.2k 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

0 votes
by (25.6k points)

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

...