TIMEOUT(1)

โœจ NAME โœจ

timeout โ€” run a command with a time limit ๐Ÿ’–

(yes bestie, this is the timeout page from the User Commands section of the manual, and we're about to make it make sense ๐Ÿซถ)


๐ŸŒธ SYNOPSIS ๐ŸŒธ

timeout [OPTION]... DURATION COMMAND [ARG]...

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so here's the entire plot: you start COMMAND, and if it's still running after DURATION, it gets killed. That's it. That's the whole thing. It's giving "you have until the timer runs out, and then we're done here" ๐Ÿ’…

Also, mandatory arguments to long options are mandatory for short options too โ€” so if the long version needs it, the short version needs it, no cap.

๐ŸŽ€ the options, one by one ๐ŸŽ€

  • -f, --foreground โ€” for when you're not running timeout directly 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=DURATION โ€” sends a KILL signal too, if COMMAND is still running this long after the initial signal was sent. Like, "okay we asked nicely, now we're not asking" ๐Ÿ’€
  • -p, --preserve-status โ€” exit with the same status as COMMAND, even when the command times out. You want the truth? Here's the truth.
  • -s, --signal=SIGNAL โ€” pick which signal gets sent on timeout. SIGNAL can be a name like 'HUP' or a number; run kill -l for the full list of signals, iykyk โœจ
  • -v, --verbose โ€” diagnoses to standard error any signal sent upon timeout. So you actually see the drama happen.
  • --help โ€” display this help and exit. Classic.
  • --version โ€” output version information and exit. Also classic.

โณ about that DURATION, bestie โณ

DURATION is a floating point number with an optional suffix:

  • 's' for seconds (the default)
  • 'm' for minutes
  • 'h' for hours
  • 'd' for days

And a duration of 0 disables the associated timeout. Zero means off. Iconic. ๐ŸŽ€

๐Ÿ”ฅ the signal situation ๐Ÿ”ฅ

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 unstoppable force, fr fr.

๐Ÿ’€ 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 (128+9)
  • - โ€” the exit status of COMMAND otherwise

๐Ÿ™ˆ BUGS ๐Ÿ™ˆ

Some platforms don't currently support timeouts beyond the year 2038. Yeah. 2038. We don't talk about it. ๐Ÿ˜ญ


โœ๏ธ AUTHOR โœ๏ธ

Written by Padraig Brady.


๐Ÿ“ข REPORTING BUGS ๐Ÿ“ข


Copyright ยฉ 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

Full documentation <https://www.gnu.org/software/coreutils/timeout> or available locally via: info '(coreutils) timeout invocation'


And that's the whole page, bestie โ€” this was GNU coreutils 9.12, dated September 2026. Go forth and time things out responsibly ๐Ÿฆ‹๐Ÿ’œ๐ŸŽ€

๐Ÿ“ฆ where this page comes from