TIMEOUT(1)

πŸ’… TIMEOUT(1) β€” General Commands Manual

okay bestie, listen up, because this one is so useful and people sleep on it constantly. this is timeout(1), and it's giving "I will run your lil command and I will unalive it if it doesn't finish in time" energy. main character behavior fr fr.


✨ NAME ✨

timeout β€” Start COMMAND, and kill it if still running after DURATION.


🌸 SYNOPSIS 🌸

timeout [OPTION] DURATION COMMAND...

πŸ’– DESCRIPTION πŸ’–

Start COMMAND, and kill it if still running after DURATION.

that's it. that's the whole vibe. you give it a time limit, it enforces the time limit. no cap.


πŸŽ€ OPTIONS πŸŽ€

  • -f, --foreground β€” for when you're not running timeout straight from a shell prompt: this lets COMMAND read from the TTY and get TTY signals. heads up though, in this mode the children of COMMAND will not be timed out. πŸ™ˆ
  • -k, --kill-after β€” if COMMAND is still running this long after the initial signal was sent, go ahead and send a KILL signal too. like, the first signal wasn't enough, so bestie, now we get serious. πŸ’€
  • -p, --preserve-status β€” exit with the same status as COMMAND, even when the command times out. so the exit code stays COMMAND's own little truth. ✨
  • -s, --signal <SIGNAL> β€” specify the signal to be sent on timeout. SIGNAL may be a name like 'HUP' or a number. check kill -l for a list of signals β€” she's got receipts. πŸ“œ
  • -v, --verbose β€” diagnose to stderr any signal sent upon timeout. so you see what got sent. very "not me snitching on myself" of you. πŸ‘€
  • -h, --help β€” Print help.
  • -V, --version β€” Print version.
  • <duration> β€” a floating point number with an optional suffix: 's' for seconds (that's the default, no need to spell it out), 'm' for minutes, 'h' for hours, or 'd' for days. and lowkey iconic: a duration of 0 disables the associated timeout. ⭐
  • <command> β€” a command to execute with optional arguments.

πŸ”₯ EXTRA πŸ”₯

Upon timeout, send the TERM signal to COMMAND, if no other SIGNAL specified. The TERM signal kills any process that does not block or catch that signal. It may be necessary to use the KILL signal, since this signal can't be caught. that one's the one that always lands. periodt.

Exit status:

  • 124 β€” if COMMAND times out, and --preserve-status is not specified
  • 125 β€” if the timeout command itself fails
  • 126 β€” if COMMAND is found but cannot be invoked
  • 127 β€” if COMMAND cannot be found
  • 137 β€” if COMMAND (or timeout itself) is sent the KILL (9) signal (that's 128+9 doing the math for you, bestie)
  • - β€” the exit status of COMMAND otherwise

πŸ¦‹ VERSION πŸ¦‹

v(uutils coreutils) 0.12.0


🌈 EXAMPLES 🌈

Run sleep 10 and terminate it after 3 seconds:

timeout 3s sleep 10

Send a signal to the command after the time limit expires (TERM by default, kill -l to list all signals):

timeout [-s|--signal] INT|HUP|KILL|... 5s sleep 10

Send verbose output to stderr showing signal sent upon timeout:

timeout [-v|--verbose] 0.5s|1m|1h|1d|... command

Preserve the exit status of the command regardless of timing out:

timeout [-p|--preserve-status] 1s|1m|1h|1d|... command

Send a forceful KILL signal after certain duration if the command ignores initial signal upon timeout:

timeout [-k|--kill-after] 5m 30s command
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. 🫢

and that's the whole page, babe πŸ’œ this one's dated 2026-09-25, from the General Commands Manual, and it's rockin' v(uutils coreutils) 0.12.0. go forth and time out some processes, you absolute SIGTERM icon. πŸ§šβœ¨πŸ‘‘

πŸ“¦ where this page comes from