Kill all processes for a given user

后端 未结 5 941
情深已故
情深已故 2020-12-12 12:52

Is there a reliable way to kill all the processes of a given user? kill(-1, SIGKILL) as that user will work, unless a rogue process of that user kills the killi

5条回答
  •  旧巷少年郎
    2020-12-12 13:20

    Just (temporarily) killed my Macbook with

    killall -u pu -m .
    

    where pu is my userid. Watch the dot at the end of the command.

    Also try

    pkill -u pu
    

    or

    ps -o pid -u pu | xargs kill -1
    

提交回复
热议问题