iwatch command not found

In this troubleshooting guide we learn how to fix iwatch command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

iwatch: command not found

or when using sudo you get the following error message

sudo: iwatch: command not found

Solutions to iwatch: command not found

How To Fix iwatch: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu iwatch is provided by iwatch package.

iwatch is:

inotify (inode notify) is a Linux kernel subsystem that monitors events in filesystems and reports those events to applications in real time.

inotify can be used to monitor individual files or directories. When a directory is monitored, inotify will return events for the directory itself and for files inside the directory.

iWatch is a Perl wrap to inotify to monitor changes in specific directories or files, sending alarm to the system administrator (or other destination) in real time. It can:

  • Send notifications via email about changes.
  • Take programmable actions immediately, as emit alerts via XMPP (jabber) messengers, WhatsApp or execute a local program or script.
  • Act as HIDS (Host-based Intrusion Detection System) or an integrity checker, complementing the firewall system in networks and improving the security.

iWatch can run as a simple command, as well a daemon.

A good example of iWatch usage is to monitor the pages directory in webservers to notify, in real time, about defacements or file insertions. Other example is to synchronize configuration files between machines, when they are changed, as in DHCP servers acting in failover mode. You also use to synchronize files, via rsync when these files are changed.

To fix this problem, we can install more using the command below.

sudo apt-get -y install iwatch

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install iwatch.

sudo apt -y install iwatch

Or if you have aptitude installed you can use the following command.

sudo aptitude install iwatch

Summary

In this tutorial we learn how to fix iwatch command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.