How to fix KiCAD Unable to add inotify watch: (error 28: No space left on device) on Linux

This post is also available in: deDeutsch (German)

Problem:

When opening KiCAD on Linux, you see the error message Unable to add inotify watch: (error 28: No space left on device):

Solution:

You need to increase the number of inotify watches that can be active at once:

echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

and then restart KiCAD