System and processes

The killall command

Sends a signal to every process sharing a name. Useful to close at once a program opened many times.

Syntax

killall [-9] programa

Most useful options

-9Forces immediate death
-iAsks for confirmation

Copy-ready examples

$ sleep 100 & && killall sleepClose every sleep

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

Typical mistakes

  • It is dangerous with generic names: killall bash could close your own session.

Related commands

FAQ

Does killall always kill?

By default it sends TERM (graceful); with -9 it forces.

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