Written 30 Aug 2026. This is a how-to, not a product card.
Stop a command after a few seconds
After SSH works, stop a command after a few seconds with timeout so you don't wait forever. You don't need extra software for this.
See change without typing again re-runs a command until you stop. Tonight you put a time limit on a command: timeout. Timeout stops a command after a few seconds so you don't wait forever. You are still only practicing in home on the computer. It does not need extra software, htop, Grafana, or a NAS for this one job.
Skip until SSH already works
SSH from the couch should already get you a prompt. If re-run until you stop is what you want, that is see change without typing again. If how long a command took is what you want, that is see how long a command took. If lid sleep is what you want, that is don't let the old laptop sleep. sleep in the practice below is a wait, not lid sleep.
What this is
timeout means give one command a time limit, then stop it. You type timeout, then 3, then the command. 3 means three seconds. When the time is up, timeout stops that command. You don't wait forever. You don't sit on Ctrl+C. Ctrl+C still means hold Control, tap C, if you want to stop early. That is stop, not delete. Tonight: timeout 3 then one command in home. It is not watch. Watch re-runs until Ctrl+C. It is not lid sleep. It is not kill -9.
Practice timeout in home
SSH in. Make sure home is where you sit:
pwd
You want a path that ends in your login name. If not:
cd ~
Give sleep a three-second limit. sleep here is a wait, not lid sleep. Lid sleep is don't let the old laptop sleep.
timeout 3 sleep 10
Then:
echo stopped waiting
The computer should print the echo after about three seconds, not ten. Timeout stopped sleep when the time was up. Practice only in home.
Skip timeout of /, /etc, whole home, other disks, USB, and /srv. Practice only in home.
Skip timeout 0 for this practice. Tonight: timeout 3.
Debian and Ubuntu usually already have timeout. Don't make apt the job. If timeout is missing:
sudo apt install coreutils
Then stop. That install is not the lesson.
No files are required for this practice. If you made practice files anyway, throw them away with careful delete only. That is delete a file carefully. Skip rm -rf.
Useful extras, still home only
Optional extra after see change without typing again: watch can stop after five seconds instead of Ctrl+C:
timeout 5 watch -n 1 date
Don't make watch the job tonight. Watch is see change without typing again.
Optional: ping can stop after three seconds, house network only:
timeout 3 ping -c 20 127.0.0.1
Don't make ping the job tonight. Ping is check that the computer can reach the house router.
What this is not
This is not watch. That is see change without typing again. It is not time. That is see how long a command took. It is not lid sleep. That is don't let the old laptop sleep. It is not which program uses CPU. That is see what is keeping the computer busy. It is not systemd timers. That is see what already runs on a schedule. It is not ping as the job. That is check that the computer can reach the house router. It is not opening SSH to the internet. That is keep the computer on the house network. Don't forward port 22.
What next
Need re-run until you stop? See change without typing again. Need how long a command took? See how long a command took. Need the clock? See what time the computer thinks it is. Keep SSH on the house network: keep the computer on the house network. Don't forward port 22.
Skip
- Skip if SSH still fails. Finish SSH from the couch first.
- Skip timeout of
/,/etc, whole home, other disks, USB, and/srv. Practice only in home. - Skip
timeout 0for this practice. Tonight:timeout 3. - Skip watch, time, lid sleep, ping, and curl as tonight's job. Those pages already exist.
- Skip kill,
kill -9, and pkill as tonight's job. Timeout stops. It is not a kill lesson. - Skip files under
/etc, SSH folders, or paths you don't own. Practice only in home. - Skip
rm -rf. Careful delete only: delete a file carefully. - Skip opening SSH to the internet so you can do this from a coffee shop. That is keep the computer on the house network. Don't forward port 22.
Sources
Debian: timeout(1). Ubuntu: timeout(1). Official pages only. For the login, see SSH from the couch. For re-run, see see change without typing again.