This instruction will store the source in /usr/local/src
following the linux convention.
$ sudo apt update
$ sudo apt install libssl-dev autoconf automake libtool python-setuptools python-dev
$ cd /usr/local/src
$ sudo git clone https://github.com/facebook/watchman.git
$ cd watchman
$ sudo git checkout v4.9.0 # the latest stable release
$ sudo ./autogen.sh
$ sudo ./configure
$ sudo make
$ sudo make install
$ watchman --version
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p