Apply kernel parameter tweaks now and make them persistent across boots using the right files and commands. 16.11.2025 | reading time: 2 min Kernel knobs are powerful but ephemeral by default; change them at runtime, then write them to the correct configuration file so the tweak survives a reboot and remains auditable. Hands-on swappiness example Change vm.swappiness now and persist it for future boots with this sequence of commands and their expected output. ```bash $ sysctl vm.swappiness vm.swappiness = 60 $ sudo sysctl -w vm.swappiness=10 vm.swappiness = 10 $ echo "vm.swappiness = 10" | sudo tee /etc/sysctl.d/99-swappiness.conf vm.swappiness = 10 $ sudo sysctl --system Loading settings from /run/sysctl.d/50-cloud.conf Loading settings from /etc/sysctl.d/99-swappiness.conf Applying kernel variables... $ sysctl vm.swappiness vm.swappiness = 10 ``` Where to place persistent settings Put distribution-agnostic overrides into a file under /etc/sysctl.d (use a high number like 99 for local precedence) or, for a single-file approach, use /etc/sysctl.conf; drop-in files in /etc/sysctl.d override distribution defaults in /usr/lib or /run. Reloading and immediate tweaks Use `sysctl -w key=value` for instant changes and `sudo sysctl --system` to load all files under /run/sysctl.d, /etc/sysctl.d and vendor directories; `sysctl -p /etc/sysctl.conf` still works for the single-file workflow. Common pitfalls and remedies Avoid echoing into /proc/sys without persisting the value; watch file precedence when multiple files set the same key; and prefer named files in /etc/sysctl.d for configuration management and package safety. Persisting sysctl settings is a small habit that prevents surprising behavior after reboots and makes kernel tuning reproducible; learn more about LINUX internals and consider formalizing your skills with certifications like CompTIA Linux+ or LPIC-1 using intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. setup boot-process security network utilities scripting