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 โ€” each pid can be expressed in one of the following ways:
    • n โ€” where n is larger than 0. the process with PID n is signalled.
    • 0 โ€” all processes in the current process group are signalled.
    • -1 โ€” all processes with a PID larger than 1 are signalled. (yes that's a lot of processes, be normal about it ๐Ÿ™ˆ)
    • -n โ€” where n is larger than 1. all processes in process group n are signalled. โš ๏ธ and here's the trap: when an argument of the form -n is 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 its pid plus pidfd_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, --signal and -signal. requires kernel version 6.9 and later.
  • name โ€” all processes invoked using this name will be signalled. yes, by name. she knows them by reputation.

๐Ÿ’… OPTIONS ๐Ÿ’…

  • -s, --signal signal โ€” 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 -l but 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 with kill, along with the signal. so you can see exactly who's about to get it ๐Ÿ‘€
  • -q, --queue value โ€” send the signal using sigqueue(3) rather than kill(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 the SA_SIGINFO flag to sigaction(2), then it can obtain this data via the si_sigval field of the siginfo_t structure. she's sending a message, not just a vibe.
  • --timeout milliseconds signal โ€” send a signal defined in the usual way to a process, followed by an additional signal after a specified delay. the --timeout option causes kill to 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-state pid โ€” 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 โ€” success
  • 1 โ€” failure
  • 64 โ€” 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