How to kill user processes from the same user?
6,015
A useful tools is slay
: sudo slay username
If you don't run slay
as root, you will end up killing off all of your processes however, rather than the specified user.
See also: https://unix.stackexchange.com/questions/18043/how-do-i-kill-all-a-users-processes-using-their-uid
Related videos on Youtube
Comments
-
Grey over 1 year
I opened a VNC server and my VNC session is suddenly dead. I have lot of xterms open. When I ssh to the machine. and type
users
I see a bunch of users – my user accounts, like:
userA UserA UserA UserA UserA UserA UserA
I know I can use
pkill -u usersname
Since I can only log in as
userA
, every time I runpkill-u UserA
, it will just kill my current session. but other userAs are still thereWhat can I do?
-
Renan almost 12 yearsWhat is the actual question?
-
slhck almost 12 years@Renan I assume he wants to kill those extra user sessions.
-
Grey almost 12 yearsexactly. other sessions are not killed, but my current session is killed
-
Renan almost 12 years@slhck That's what I assumed, too. But he edited the question for clarification.
-