← Back to Blog

SRE HELPER WATCH

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.

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:

Got stuck? Drop a comment, or reach out on any of my social platforms above! 😎


Imported from rifaterdemsahin.com Β· 2025