D
D
Direwolf2020-09-13 16:32:15
linux
Direwolf, 2020-09-13 16:32:15

Is it possible to kill all processes using the Linux terminal?

And, if possible, how to do it?

Answer the question

In order to leave comments, you need to log in

7 answer(s)
H
HemulGM, 2020-09-13
@HemulGM

Or maybe open the newbie documentation and read it?

R
Ronald McDonald, 2020-09-13
@Zoominger

Can. Google "kill" or "init".
There is no defense against a fool in Shvabodny.

S
Saboteur, 2020-09-13
@saboteur_kiev

you can
use the kill command

C
CityCat4, 2020-09-13
@CityCat4

Can.
You can even kill the terminal process itself, from which the command is called.
You can even kill the entire system by deleting one file :)

S
Saiputdin Omarov, 2020-09-13
@generalx

just turn off the pc

M
metajiji, 2020-09-14
@metajiji

Direct answer to the question

ps ax | awk '{print $1}' | xargs kill

And it is better not to do this on a live system, the result is not predictable.

A
Alexey Kharchenko, 2020-09-15
@AVX

Why unpredictable? The first in the awk PID 1 list is /sbin/init.
When I ran this full command, my session just ended without warning and without saving data in applications (well, I didn’t open or do anything much, and the tab browser restored itself) .
Interestingly, manually killing a process with PID 1 does not work (operation not allowed).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question