In the world of Linux commands, killall serves as a powerful tool for sending signals to multiple running processes simultaneously. While the traditional kill command targets a specific process ID, killall broadens its scope by enabling users to terminate multiple processes at once.

Syntax

The basic syntax of the killall command is as follows:

killall <name>

Here, <name> refers to the name of a program or process. For instance, if you have multiple instances of the top program running and want to terminate all of them, you can simply execute killall top.

Specifying Signals

Similar to the kill command, killall allows users to specify signals to be sent to the target processes. To learn more about the various types of signals, you can refer to our detailed tutorial on the kill command. Here’s an example of specifying a signal with killall:

killall -HUP top

Compatibility

The killall command is not limited to Linux alone. It is also functional on macOS, Windows Subsystem for Linux (WSL), and any UNIX environment you may be using.

In conclusion, the killall command provides a convenient way to manage multiple processes simultaneously, making it an invaluable tool for administrators and developers.