Linux for Developers Course
Linux for Developers
/
Intermediate

killall

Definition

A command that kills processes by their exact name, rather than their numeric Process ID (PID). It sends a signal to every single process sharing that name.

Explain Like I'm New

The shotgun. Instead of looking up 5 different ID numbers to kill 5 Python scripts, you just say 'Kill everything named Python'.

Real World Example

You accidentally started 10 background instances of the `nginx` web server. Finding and killing all 10 PIDs manually would take forever. You type `killall nginx`, and all 10 are terminated instantly.

Common Use Cases

  • •Bulk terminating identical processes

Interview Questions

basic

  • What happens if you type `killall python` but accidentally spell it `killall pyhton`?

intermediate

  • Why is running `killall` generally considered dangerous on a shared production server?

Flash Cards

Question

Misspell name?

Click to reveal answer
Answer

It will simply output 'no process found' and do nothing.

Question

Why dangerous?

Click to reveal answer
Answer

Because it doesn't ask questions. If you type `killall node`, it will kill YOUR node app, but it will also kill the production node app being run by the database team, bringing down the entire company's website.