SRE HELPER WATCH
How to Fix the "Command Not Found: watch" Error on macOS π»
It looks like youβve encountered the dreaded βcommand not found: watchβ issue while trying to use the watch command on your Mac. π± Fear not! The watch command is an incredibly useful tool that lets you run a command repeatedly at intervals, displaying the output each time. If it's not working for you, it's probably because watch isn't installed by default on macOS.
In this post, Iβll walk you through the steps to install watch using Homebrew, so you can get back to monitoring your commands in no time. Letβs get started! π
β οΈ The Issue
When you run watch kubectl get pods -n monitoring or any other command using watch, you might see an error message like this:
zsh: command not found: watch
π οΈ How to Fix It
To fix this issue, you need to install the watch command using Homebrewβa package manager for macOS. If you donβt have Homebrew installed yet, no worries, Iβll show you how to install that as well. Follow these simple steps below.
Step 1: Install Homebrew πΊ
If you donβt already have Homebrew installed, you can install it by running the following command in your terminal. This command will download and install Homebrew onto your system:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once the installation is complete, youβll be able to use Homebrew to install a variety of useful packages, including watch. β
Step 2: Install the watch Command π
Now that Homebrew is installed, itβs time to install watch. Simply run the following command in your terminal:
brew install watch
This will install the watch command on your Mac. π
Step 3: Confirm Installation βοΈ
Once installed, you can check that the watch command is available by running:
watch --version
If everything is set up correctly, youβll see the version of watch thatβs installed, and you can start using it right away! π
π― Conclusion
That's it! You've successfully installed watch on your Mac, and youβre all set to monitor your terminal commands in real-time. From here on, running commands like watch kubectl get pods -n monitoring will work without a hitch. π
π Connect with me:
-
πΌ LinkedIn: Rifat Erdem Sahin
-
π¦ Twitter: Rifat on X (formerly Twitter)
-
π₯ YouTube: Rifat Erdem Sahin on YouTube
-
π» GitHub: GitHub Profile
Got stuck? Drop a comment, or reach out on any of my social platforms above! π
Imported from rifaterdemsahin.com Β· 2025