kill
kill allows sending a signal to processes
Typical usage: process management, free up resources, troubleshootingIntroduction into kill
The kill command is used on Linux to send a process signals. This can be a numeric value or its defined name (e.g. SIGTERM).
Installation
When kill is not installed by default, it can be added to the system using the relevant software package.
Package information for kill
Operating system | Package name | Installation |
---|---|---|
AlmaLinux | procps-ng |
|
Arch Linux | procps-ng |
|
Debian | procps |
|
Fedora | procps-ng |
|
openSUSE | procps |
|
Red Hat Enterprise Linux | procps-ng |
|
Rocky Linux | procps-ng |
|
Ubuntu | procps |
|
Your Linux distribution using a different package? Share your feedback.
Usage
Available options
Long option | Short option | Description |
---|---|---|
--list [SIGNAL] | -l [SIGNAL] | Show signal names. Signal is optional, can be used to translate between name and number. Note: Long option might not work. |
--table | -L | Show signal names in a table. Note: long option might not work |
--signal SIGNAL | -s SIGNAL | Specify the signal to send. Not: long option might not work |
Missing an option in this overview? Share your feedback.
Examples using kill
Convert signal number to a name
Translate signal 9 to a name
kill -l 9
Frequently Asked Questions
What is the kill command and its purpose?
The kill command can be used on Linux systems to send a defined signal to a process. Learn how to use it and what signals are available.
Which package provides the kill command?
The command kill is provided by the procps or procps-ng package.
Relevant articles using the kill command
The following articles include an example on how to use kill and might be worth further exploring.
- How to kill a zombie process
- Kill a process that won't respond to CTRL+C
- Understand and configure core dumps on Linux
- OpenSSH security and hardening
Related and similar commands
Linux has a lot of tools and commands available and sometimes you just need that little other tool. Here is a list of commands that are similar or related to kill:
Command | Category | Summary |
---|---|---|
basename | files | Strips directory and file name suffix from a given path |
chrt | processes | Sets Linux scheduler policy and priority for a process or command |
nice | processes | Runs commands with specified priority |
numactl | processes | Controls NUMA policy for processes and shared memory |
peekfd | processes | Tracks a process and show file descriptor activity |
pidof | processes | Returns process IDs for a process name |
pidstat | monitoring | Monitoring CPU, memory, and disk activity |
pidwait | processes | Wait for process to stop |
pmap | processes | Shows memory mapping of process |
prtstat | processes | Shows process details for selected process like state, CPU and memory usage |
pscap | capabilities | Display available capabilities for running processes |
pslog | logging | Shows which log files a process has opened |
pstree | processes | Show active processes and children like a tree |
pwdx | processes | Shows current working directory of a process |
renice | processes | Changes the priority of running processes |
slabtop | memory | Shows slab usage of kernel |
smem | memory | Show memory usage including swap |
strace | process inspection | Inspects running process |
units | data conversion | Converts a unit into another one, like from Celcius to Fahrenheit |
watch | processes | Monitors changes in output of specified command |
Also 💙 the command-line or terminal? Here is a set of cheat sheets for Linux to get more done from within the shell: