System and processes
The watch command
Repeats a command every few seconds to watch for a change: memory, space, connections...
Syntax
watch [-n SEGUNDOS] COMANDOMost useful options
-n SEGUNDOSHow often it repeats (2 by default)Ctrl+CQuits watchCopy-ready examples
$ watch -n 1 dateThe time updating$ watch -n 2 'df -h'Watch the free spaceYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- Here a single simulated pass is shown; on real Linux it refreshes until Ctrl+C.
- If the command has pipes or quotes, wrap it in quotes.
FAQ
Can I highlight what changes?
Yes, with watch -d on a real Linux.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course