• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

killall Command Examples in Linux

by admin

It’s also possible to send signals to multiple processes matching a specified program or username by using the killall command. Here is the syntax:

# killall [-u user] [-signal] name...

To demonstrate, we will start a couple of instances of the sleep program and then terminate them.

$ sleep 500 &
[1] 18801
$ sleep 600 &
[2] 18802
$ killall sleep
[1]-  Terminated              sleep
[2]+  Terminated              sleep

Remember, as with kill, you must have superuser privileges to send signals to processes that do not belong to you.

killall Command Examples

1. To kill all the specified commands:

# killall 

2. To list all known signals:

# killall -l
# killall --list

3. Do not complain if no processes were killed:

# killall -q
# killall --quiet 

4. To send the specified signal instead of SIGTERM:

# killall -s 9 bash
# killall --signal 9 bash 

5. To kill processes owned by particular user:

# killall -u mike 

6. To set to verbose mode:

# killall -v
# killall --verbose 

7. To display the version:

# killall -V
# killall --version 

8. To specify to wait for all the killed processes to die:

# killall -w
# killall --wait 

9. To kill processes with specified security context:

# killall -Z
# killall --context 

10. Interactively ask for confirmation before termination:

# killall -i process_name

11. Terminate a process using the SIGINT (interrupt) signal, which is the same signal sent by pressing `Ctrl + C`:

# killall -INT process_name

12. Force kill a process:

# killall -KILL process_name

Conclusion

Commands often used in conjunction with ps are kill and killall. When running ps, we saw that there is a column that displays PID, short for process ID. If a process isn’t running right, hanging, or we just want to end it, one way is using the kill command. Simply pass it the PID, for example, given a PID of 123:

# kill 123

If you want to match the process by name instead of PID, you can use killall, for example, if Firefox was frozen and we wanted to force quit:

# killall firefox

Filed Under: Linux

Some more articles you might also be interested in …

  1. jpegtran: command not found
  2. axel: Download accelerator (Command Examples)
  3. Unable to Run X Applications Through SSH in Linux
  4. genkernel Command Examples in Linux
  5. tee Command Examples in Linux
  6. dirb Command Examples in Linux
  7. dep: A CLI tool for deployment of PHP applications
  8. uuid: command not found
  9. UNIX / Linux : Send mail with attachment using mutt
  10. jarsigner Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright