timeout

Run a command with a time limit. More information: <https://www.gnu.org/software/coreutils/timeout>.

Install

All systems
curl cmd.cat/timeout.sh
Debian Debian
apt-get install coreutils
Ubuntu
apt-get install coreutils
Alpine
apk add coreutils
Arch Arch Linux
pacman -S coreutils
image/svg+xml Kali Linux
apt-get install coreutils
CentOS
yum install coreutils
Fedora
dnf install coreutils
Windows (WSL2)
sudo apt-get update sudo apt-get install coreutils
OS X
brew install coreutils
Raspbian
apt-get install coreutils
Docker
docker run cmd.cat/timeout timeout powered by Commando

Run a command with a time limit. More information: <https://www.gnu.org/software/coreutils/timeout>.

  • Run `sleep 10` and terminate it, if it runs for more than 3 seconds:
    timeout 3s sleep 10
  • Specify the signal to be sent to the command after the time limit expires. (By default, TERM is sent):
    timeout --signal INT 5s sleep 10

© tl;dr; authors and contributors