Step 1/1: Run again and again

watch COMMAND runs a command every 2 seconds and shows its latest output full screen; Ctrl+C quits. -n SECONDS changes the interval, -d highlights what changed. Quote commands with spaces or pipes: watch -n 1 'ls -l | wc -l'.

$ watch -n 2 'ls -l'
Fundamentalswatch
Run a command again and again
Use watch to run ls -l every 3 seconds; watch it refresh a few times, then press Ctrl+C to quit.

This exercise needs real Linux

The commands it uses (processes, networking and more) are not in the simulator. Switch to real Linux and the exercise runs in a real Linux system inside your browser.

timeoutNext lesson:lsof