Check current value:
cat /proc/sys/fs/inotify/max_user_watches
Temporarily change the value:
This change will reset after reboot.
sudo sysctl fs.inotify.max_user_watches=524288
Permanently change the value:
Edit or create the config file:
sudo nano /etc/sysctl.d/99-inotify.conf
Add the following line (or update if it already exists):
fs.inotify.max_user_watches=524288
Apply changes:
sudo sysctl -p /etc/sysctl.d/99-inotify.conf
Verify:
cat /proc/sys/fs/inotify/max_user_watches