How to Kill Work Process by Username (UNIX / Linux)

1. Find and list all the work process from the user.

ps -ef | grep [USER]
UID        PID  PPID  C STIME TTY          TIME CMD
USER         1     0  0 Apr23 ?        00:01:22 init [3]
USER         2     1  0 Apr23 ?        00:00:09 [migration/0]
USER         3     1  0 Apr23 ?        00:00:00 [ksoftirqd/0]

2. Execute below command

pkill -u [USER]

or

killall -u [USER]

You May Also Like

Leave a Reply?