Created
March 29, 2022 17:45
-
-
Save shollingsworth/fd3f83a26af61d41f5569519ef6625c1 to your computer and use it in GitHub Desktop.
change inotify settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/bash | |
| if [[ $(whoami) != "root" ]]; then | |
| echo "You must be root to run this script." | |
| exit 1 | |
| fi | |
| echo "----------------------" | |
| echo "Existing settings" | |
| echo "----------------------" | |
| sysctl fs.inotify | |
| echo "----------------------" | |
| echo "Setting new settings" | |
| echo "----------------------" | |
| sysctl -n -w fs.inotify.max_user_watches=65536 | |
| sysctl -n -w fs.inotify.max_user_instances=1024 | |
| sysctl -n -w fs.inotify.max_queued_events=65536 | |
| echo "----------------------" | |
| echo "Reloaded settings" | |
| echo "----------------------" | |
| sysctl -p | |
| echo "----------------------" | |
| echo "New Settings" | |
| echo "----------------------" | |
| sysctl fs.inotify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment