What is Watch Command?

Linux Guides

The watch command in Linux repeatedly runs a command at regular intervals, displaying output updates.

Basic Watch Syntax

Linux Guides

Use watch <command> to execute any command repeatedly and monitor changes.

Set Time Interval

Linux Guides

Add -n <seconds> to set custom intervals, like watch -n 5 <command> for updates every 5 seconds.

Highlight Output Changes

Linux Guides

Use watch -d <command> to highlight differences between consecutive outputs for better visibility.

Monitor VPS Resources

Linux Guides

Combine watch with commands like df or top to track disk usage and system performance in real time.