killall looks up processes by executable name and sends them a signal: SIGTERM by default, like kill. It is convenient when you don't care about the PID, only the command.
killall firefox # terminate all firefox processes
killall -9 chrome # SIGKILL by name
killall -u alice # kill all processes owned by alice
killall -i sshd # prompt before each kill
Beware: on some non-Linux Unixes (notably older Solaris) killall means "kill every process on the system" and is used to shut down. On Linux it is always name-based and safe within that constraint.
Discussed in:
- Chapter 10: Processes and Job Control — Signals and Killing Processes