fswatch command not found

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

Introduction

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

fswatch: command not found

or when using sudo you get the following error message

sudo: fswatch: command not found

Solutions to fswatch: command not found

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

In Ubuntu fswatch is provided by fswatch package.

fswatch is:

fswatch is a file change monitor that receives notifications when the contents of the specified files or directories are modified. fswatch implements the following kinds of monitors:

  • A monitor based on the File System Events API of Apple OS X.
  • A monitor based on kqueue, an event notification interface introduced in FreeBSD 4.1 and supported on most *BSD systems (including OS X).
  • A monitor based on inotify, a Linux kernel subsystem that reports file system changes to applications.
  • A monitor based on File Events Notification, a Solaris/Illumos kernel API that reports file events.
  • A monitor which periodically stats the file system, saves file modification times in memory and manually calculates file system changes, which can work on any operating system where stat (2) can be used.

fswatch should build and work correctly on any system shipping either of the aforementioned APIs

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

sudo apt-get -y install fswatch

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

You can also use apt command to install fswatch.

sudo apt -y install fswatch

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

sudo aptitude install fswatch

Summary

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