System and processes

The killall command

Sends a signal to every process with a given name. Unlike kill, it takes the name instead of the PID: it is handy to close a frozen program without looking up its number.

Syntax

killall [opciones] nombre...Try it in the terminal →

Most useful options

-9Sends SIGKILL: the process cannot ignore it or clean up. Use it only if the normal signal fails.
-iAsks for confirmation for each process found.
-u <usuario>Only processes owned by that user.
-wWaits until the processes have really ended before returning.
-eExact name match (up to 15 characters on Linux).
-r <regex>Reads the process name pattern as an extended regular expression.
-vReports every signal it sends successfully.

Copy-ready examples

$ killall firefoxSends SIGTERM to every firefox instance so they close cleanly.
$ killall -i -u miguel chromiumAsks before each chromium process owned by miguel.
$ sudo killall -9 nginxForces every nginx process to close. Try without -9 first so they can close their files cleanly.
$ killall -w -v python3Waits until they finish and reports each one.

You can try them in the browser terminal: it does not touch your computer.

Common errors

MessageCauseFix
nosuchproc: no process foundNo process has that name: it already ended or the name is misspelled.Check the exact name with pgrep -l and run killall again.
bash: killall: command not foundpsmisc is not installed; killall ships in that package and is missing from Git Bash and minimal images.Install it with sudo apt install psmisc.
No error messageWithout permission the signal does not arrive: the process belongs to another user and you need sudo.Use sudo, but first confirm the owner with pgrep -l -u user.

Typical mistakes

  • killall python3 does not kill python3.12: the name must match exactly, or use -r.

Differences from similar commands

  • kill: Needs the exact PID. killall uses the name and can reach several processes at once.
  • pkill: Matches by pattern, like pgrep, and -f checks the full command line. killall requires the exact name.

Security

killall -9 on generic names such as node, python or java can kill other tools, including your editor or a system service. Check first with pgrep -l and use -i to confirm. Never run it with sudo on names you have not checked.

Related commands

FAQ

Which signal does it send by default?

SIGTERM (15), which lets the program close its files properly. Use -9 only if it does not respond.

Does it restart it afterwards?

No: killall only sends the signal. If it is a service, start it again with systemctl restart.

What if the process does not die even with -9?

If even SIGKILL does not stop it, it is usually stuck in the kernel (state D), for example waiting for a disk.

More System and processes commands

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course