How do you continuously watch / monitor a Linux command?

Sometimes you want to continuously observe a Linux command. Instead of up arrow and enter the whole time, try this:

watch -n 1 "systemctl is-active mysql"

The above command will “watch” every 1 second if MySQL is active.

Note: Complex command must be in quotes.

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top