timeout
ProcessesFundamentals In real LinuxRun a command with a time limit
Name: timeout
This command needs a real Linux system; you can practise it in real Linux mode.
Description
timeout runs a command and signals it (SIGTERM by default) if it is still running after the time limit; the exit status is then 124. It keeps a hung command from stalling a script.
Syntax
timeout [OPTION] DURATION COMMANDCommon options
| -s / --signal SIGNAL | Signal to send (default TERM) |
| -k / --kill-after DURATION | Force kill after this extra time |
| --preserve-status | Exit with the command’s own status rather than 124 |