Timeout
lastmod 2026-11-10created 2025-11-042 edits
timeout is a GNU coreutils command that runs a command and forcibly terminates it if it has not finished after a specified duration. Besides seconds, the duration can be written with suffixes such as 5m and 1h; -s changes the signal to send, and -k sets a grace period after which KILL is sent if the command is still alive after the first signal. It is used in scripts to wrap network commands or tests that may stop responding.
Start COMMAND, and kill it if still running after DURATION.