Beginner Package: procps

watch

Run a command repeatedly, showing its output full-screen.

Syntax

watch [options] command

Description

watch re-runs a given command at a regular interval (2 seconds by default) and displays the output full-screen, highlighting what changed โ€” handy for keeping an eye on something like disk usage or a process count without manually re-running a command.

Examples

watch df -h
Repeatedly show disk usage, refreshing every 2 seconds
watch -n 5 "ss -tulpn | grep 443"
Watch a specific command with a custom refresh interval
watch -d ps aux
Highlight differences between each refresh

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE Alpine Linux