Skip to content

killall Linux Command Guide

The Linux killall command is used to terminate processes by name, allowing for the quick and efficient termination of multiple processes at once. This command can be helpful in situations where specific processes need to be stopped without knowing their exact PIDs. By specifying the name of the process to be terminated, killall can help streamline the process management on a Linux system.

killall Syntax:

Terminal window
killall [options] [process name]

Options:

OptionDescription
-eShow the argument list of the processes killed.
-gOnly match processes in the process group.
-iIgnore case distinctions in process names.
-qBe quiet; only report errors.
-sSend a specified signal.
-vReport if the signal is successfully sent.

Parameters:

ParameterDescription
process nameSpecify the name of the process to kill.

killall Command Samples:

Kill all instances of a specific process

Terminal window
killall firefox

This command will terminate all running instances of the Firefox browser.

Forcefully kill all instances of a process by name

Terminal window
killall -9 chrome

The -9 option sends a SIGKILL signal to forcefully terminate all instances of the Chrome browser.

Kill all instances of a specific user’s processes

Terminal window
killall -u username

This command will terminate all processes belonging to the user “username”.

Kill all instances of a process by process ID

Terminal window
killall -p 1234

This command will terminate the process with the ID 1234.

Kill all instances of a process group

Terminal window
killall -g groupname

Terminates all processes that belong to the process group named “groupname”.

Quietly kill all instances of a process by name

Terminal window
killall -q processname

This command will suppress the error messages that may occur while terminating all instances of the specified process.

Kill all instances of a process except for a specified one

Terminal window
killall -e processname

This command will terminate all instances of the specified process except for the one that initiated the killall command.

killall FAQ:

How do I use killall in Linux?

To use the killall command in Linux, execute the following command:

Terminal window
killall --signal <signal> <process_name>

What is the purpose of killall in Linux?

The killall command is used in Linux to terminate processes by name.

How can I force kill processes with killall?

To force kill processes with killall, use the -9 or --signal 9 option.

Terminal window
killall -9 <process_name>

Can killall kill multiple processes at once?

Yes, killall can terminate multiple processes at once by specifying the process names separated by spaces.

Terminal window
killall <process_name1> <process_name2>

How do I selectively kill processes by user with killall?

To selectively kill processes by a specific user with killall, use the -u or --user option followed by the username.

Terminal window
killall --user <username> <process_name>

Is there a way to quiet killall output?

Yes, you can suppress the output of killall by using the -q or --quiet option.

Terminal window
killall --quiet <process_name>

Applications of the killall command

  • Killing a process by name
  • Sending a signal to multiple processes by specifying a name
  • Terminating all instances of a specific program
  • Forcefully stopping multiple processes with the same name