flybywire Asked: 2009-07-17 00:45:54 +0800 CST2009-07-17 00:45:54 +0800 CST 2009-07-17 00:45:54 +0800 CST linux: kill all my processes but not this terminal 772 I want an easy way in linux to kill all my current processes. The problem with kill -9 -1 is that it also kills the current terminal. Is there an easy way to kill everything except the current terminal? linux bash kill 2 Answers Voted Best Answer Inshalla 2009-07-17T01:47:02+08:002009-07-17T01:47:02+08:00 This kills all processes except the ones associated with the current terminal: kill `ps -o pid= -N T` Rob Wells 2009-07-17T00:52:33+08:002009-07-17T00:52:33+08:00 But just want to say don't use -9 as a knee jerk mechanism as it should be used as a last resort. It can't be caught by the process and doesn't let a process cleanup its resources. Try maybe kill -15 instead to start.
This kills all processes except the ones associated with the current terminal:
But just want to say don't use -9 as a knee jerk mechanism as it should be used as a last resort. It can't be caught by the process and doesn't let a process cleanup its resources.
Try maybe kill -15 instead to start.