Process Management

watch

Execute a command repeatedly at intervals and display full-screen output.

Synopsis

syntax
watch [OPTION]... COMMAND

Examples

Monitor disk space every 2 seconds
watch df -h
Watch pod status every second
watch -n 1 'kubectl get pods'
Monitor memory with change highlighting
watch -d free -m
Wait until a file appears
watch -g 'ls /tmp/done'

Common options

FlagDescription
-nInterval in seconds (default 2)
-dHighlight differences between updates
-tTurn off header
-gExit when output changes
-cInterpret ANSI color sequences

About watch

The `watch` command execute a command repeatedly at intervals and display full-screen output. Process management commands let you monitor, control, and schedule running processes.

Linux is a multitasking operating system, and understanding how to list processes, send signals, adjust priorities, and manage background jobs is vital for system administration and debugging performance issues. The command accepts 5 commonly used flags shown above, though the full set of options is available in the man page (`man watch`).

The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Process Management Commands

Other commands in the Process Management category

Related tools