Persistent fs.inotify.max_user_watches


how can you make fs.inotify.max_user_watches persistent beween reboots ?

I try this approach but it goes away after a reboot:

cat /proc/sys/fs/inotify/max_user_watches
echo fs.inotify.max_user_watches=1000000 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Please read man sysctl.d. TL:DR; create a file /etc/sysctl.d/max_user_watches.conf and put fs.inotify.max_user_watches = 1000000 in there. (double check the format, I wrote this by heart).