show current limit:
cat /proc/sys/fs/inotify/max_user_watches
change temporarily:
Run sudo sysctl fs.inotify.max_user_watches=
with your preferred value at the end.
change permanently:
Replace the value within the /proc/sys/fs/inotify/max_user_watches file with your own, i.e echo 524288 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
.
OR DO
sudo echo "fs.inotify.max_user_watches=$" >> /etc/sysctl.conf
To make the changes take effect without rebooting, run:
sudo sysctl -p /etc/sysctl.conf