Persistent Processes & Live Monitoring (nohup & watch)
Concept & Overview
Long-running tasks need two critical abilities: surviving unexpected network disconnects, and real-time execution monitoring without manual re-typing:
- nohup : Runs a command immune to SIGHUP (hangup signals). If your SSH session drops or terminal closes, the program continues executing in the background, redirecting stdout/stderr into nohup.out.
- watch -n : Repeatedly executes a command at a set interval (default 2s), clearing the screen to display a live updating dashboard of system state.
nohup ./backup.sh &, then monitor storage disk changes live using watch -n 2 df -h.Command Syntax Reference
| Command / Syntax | Description |
|---|---|
nohup ./backup.sh & | Run script immune to hangups in background |
watch -n 2 df -h | Periodically execute df -h every 2 seconds |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Run nohup ./backup.sh &
- ○Run watch -n 2 df -h to monitor storage live
Ready to complete Quest 68?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.