-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux watch Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to watch on Linux, covering Arch Linux, CachyOS, and other distributions including monitoring commands, periodic execution, and real-time monitoring.
watch executes command periodically.
Uses:
- Monitor commands: Watch command output
- Periodic execution: Run commands repeatedly
- Real-time monitoring: Monitor in real-time
- System monitoring: Monitor system status
Why it matters:
- Monitoring: Monitor command output
- Real-time updates: See updates in real-time
- System observation: Observe system changes
Basic usage:
# Watch command (default: 2 seconds)
watch command
# Updates every 2 secondsSet interval:
# Custom interval (5 seconds)
watch -n 5 command
# -n = interval (seconds)Monitor system:
# Monitor processes
watch -n 1 'ps aux | head -20'
# Monitor disk usage
watch -n 2 df -h
# Monitor memory
watch -n 1 free -hShow differences:
# Highlight changes
watch -d command
# -d = differences (highlights changes)Quick updates:
# Update every second
watch -n 1 command
# Very fast updatesSlower updates:
# Update every 10 seconds
watch -n 10 command
# Less frequent updatesCheck installation:
# Check watch
which watch
# Install if missing
sudo pacman -S procps-ngThis guide covered watch usage, command monitoring, and periodic execution for Arch Linux, CachyOS, and other distributions.
- htop Guide - Interactive monitoring
- System Monitoring - System monitoring
-
watch Documentation:
man watch
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.