KILL(1)
๐ KILL(1) โ the manual page, but make it bestie ๐
okay so this is kill(1) from the util-linux squad (we're on version 2.42.4, dated 2026-09-21 โ keep that in your back pocket, i'll bring it back at the end ๐). it's a User Commands girlie. let's get into it.
โจ NAME โจ
kill โ terminate a process ๐
lowkey the most main-character name in all of Unix. she doesn't ask, she terminates.
๐ธ SYNOPSIS ๐ธ
kill [-signal|-s signal|-p] [-q value] [-a] [--timeout milliseconds
signal] [--] pid|pid:_pidfd_inode_|name...
kill [-signal|-s signal] pid|pid:_pidfd_inode_...
kill -l [number|0xsigmask] | -L
kill -d pid
four whole forms, each one a different vibe. pick your fighter ๐ฅ
๐ฆ DESCRIPTION ๐ฆ
so the kill command sends the signal you picked to the processes or process groups you picked. that's it. that's the whole job. iconic behavior honestly.
if you don't specify a signal, TERM gets sent by default. the default action for TERM is to terminate the process. and listen โ use TERM before you reach for KILL (number 9), because a process might have installed a handler for TERM so it can do its clean-up steps and exit in an orderly fashion first. it's giving โจhealthy communicationโจ. if a process still doesn't terminate after a TERM has been sent, then you can use the KILL signal โ but be aware that KILL cannot be caught ๐ญ, so it does NOT give the target process the opportunity to do any clean-up before terminating. no closure, no goodbye, just gone.
most modern shells have a builtin kill command with a usage that's pretty similar to the command described here. the --all, --pid, and --queue options โ plus the ability to specify processes by command name โ are local extensions. so if your shell's kill looks different, that's why, not you being confused ๐ซถ.
and if the signal is 0, then no actual signal is sent, but error checking is still performed. it's the "just checking if you're alive" text of Unix. no signal, just vibes ๐
๐ ARGUMENTS ๐
the list of processes to be signalled can be a mixture of names and PIDs. yes, you can mix and match, she's flexible like that.
pidโ eachpidcan be expressed in one of the following ways:nโ wherenis larger than0. the process with PIDnis signalled.0โ all processes in the current process group are signalled.-1โ all processes with a PID larger than1are signalled. (yes that's a lot of processes, be normal about it ๐)-nโ wherenis larger than1. all processes in process groupnare signalled. โ ๏ธ and here's the trap: when an argument of the form-nis given and it's meant to denote a process group, either a signal must be specified first, or the argument must be preceded by a--option โ otherwise it'll be taken as the signal to send. no cap, this is the number one way people break things.
pid:_pidfd_inode_โ a process can be referenced by itspidpluspidfd_inode(pid:pidfd_inode), so you can uniquely identify it and do race-free signalling. so clean, so demure. ๐ง this works only for the options-s,--signaland-signal. requires kernel version6.9and later.nameโ all processes invoked using this name will be signalled. yes, by name. she knows them by reputation.
๐ OPTIONS ๐
-s,--signalsignal โ the signal to send. it may be given as a name or a number. name or number, she's bilingual ๐-l,--list[number|0xsigmask] โ print a list of signal names, convert the given signal number to a name, or convert the given signal mask to names. the signals can be found in/usr/include/linux/signal.h. here's the actual glow-up in action:
$ ps s $$
UID PID PENDING BLOCKED IGNORED CAUGHT STAT TTY TIME COMMAND
1000 1608069 0000000000000000 0000000000000002 0000000000384000 0000000008013003 Ss pts/44 0:02 zsh
$ kill -l 0x0000000000384000
TERM
TSTP
TTIN
TTOU
if neither NUMBER nor 0xSIGMASK is given, it lists all the signal names. and in that case, it prints one signal per line when the output is not a terminal. polite of her honestly.
-L,--tableโ similar to-l, but it prints signal names and their corresponding numbers. like-lbut with receipts ๐ฅ. prints one signal per line when the output is not a terminal.-a,--allโ do not restrict the command-name-to-PID conversion to processes with the same UID as the present process. she's expanding her social circle.-p,--pidโ only print the process ID (PID) of the named processes, and do not send any signals. all the intel, none of the violence ๐ต๏ธโโ๏ธ-r,--require-handlerโ do not send the signal if it isn't caught in userspace by the signalled process. if they're not set up to receive it, she simply doesn't send it. boundaries โ--verboseโ print the PID(s) that will be signalled withkill, along with the signal. so you can see exactly who's about to get it ๐-q,--queuevalue โ send the signal usingsigqueue(3)rather thankill(2). the value argument is an integer that's sent along with the signal. if the receiving process has installed a handler for this signal using theSA_SIGINFOflag tosigaction(2), then it can obtain this data via thesi_sigvalfield of thesiginfo_tstructure. she's sending a message, not just a vibe.--timeoutmilliseconds signal โ send a signal defined in the usual way to a process, followed by an additional signal after a specified delay. the--timeoutoption causeskillto wait for a period defined in milliseconds before sending a follow-up signal to the process. this feature is implemented using the Linux kernel PID file descriptor feature, in order to guarantee that the follow-up signal is sent to the same process โ or not sent at all if the process no longer exists. ๐
note that the operating system may re-use PIDs, and implementing an equivalent feature in a shell using kill and sleep would be subject to races whereby the follow-up signal might be sent to a different process that used a recycled PID. so like. don't do that. ๐ญ
the --timeout option can be specified multiple times: the signals are sent sequentially with the specified timeouts. and --timeout can be combined with the --queue option. stackable slay.
as an example, the following command sends the signals QUIT, TERM and KILL in sequence and waits for 1000 milliseconds between sending the signals:
kill --verbose --timeout 1000 TERM --timeout 1000 KILL \
--signal QUIT 12345
-d,--show-process-statepid โ decode signal-related fields in/proc/pid/status. look how pretty:
$ kill -d $$
Blocked: INT
Ignored: TERM TSTP TTIN TTOU
Caught: HUP INT PIPE ALRM CHLD WINCH
-h,--helpโ display help text and exit. the "what does this do again" button ๐ซถ-V,--versionโ display version and exit.
โญ EXIT STATUS โญ
kill has the following exit status values, and they mean exactly this:
0โ success1โ failure64โ partial success (when more than one process specified)
64 is the "some of them ate, some of them didn't" status ๐
๐ฅ NOTES ๐ฅ
okay so this part is important, bestie. although it's possible to specify the TID (thread ID, see gettid(2)) of one of the threads in a multithreaded process as the argument of kill, the signal is nevertheless directed to the process (i.e., the entire thread group). in other words, it is not possible to send a signal to an explicitly selected thread in a multithreaded process ๐ซ . the signal will be delivered to an arbitrarily selected thread in the target process that is not blocking the signal. for more details, see signal(7) and the description of CLONE_THREAD in clone(2). i know. i know. i'm sorry.
various shells provide a builtin kill command that is preferred in relation to the kill(1) executable described by this manual. the easiest way to ensure you're executing the command described in this page is to use the full path when calling the command, for example:
/bin/kill --version
iykyk ๐
๐ AUTHORS ๐
- Salvatore Valente
<svalente@mit.edu> - Karel Zak
<kzak@redhat.com>
the original version was taken from BSD 4.4. legends only.
๐ SEE ALSO ๐
bash(1), tcsh(1), sigaction(2), kill(2), sigqueue(3), signal(7) proc(5) proc_pid_status(5)
(the missing comma between signal(7) and proc(5) is in the original and i'm not fixing it, i'm not that kind of girl ๐)
๐ REPORTING BUGS ๐
for bug reports, use the issue tracker at <https://github.com/util-linux/util-linux/issues>. tell them exactly what happened, they love that.
๐ AVAILABILITY ๐
the kill command is part of the util-linux package, which can be downloaded from the Linux Kernel Archive at <https://www.kernel.org/pub/linux/utils/util-linux/>. go get her ๐ฆ
and that's the whole page bestie โจ โ brought to you by util-linux 2.42.4, dated 2026-09-21, filed under KILL(1). she's been terminating processes since BSD 4.4 and she'll terminate yours too ๐
๐ periodt.
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms