/etc/sysctl.conf

TLDR: The `/etc/sysctl.conf` file is a configuration file in Linux systems used to define system-level kernel parameters at runtime. These parameters, which are applied through the sysctl utility, control various aspects of the kernel's behavior, such as networking, memory management, and security. By modifying `/etc/sysctl.conf`, administrators can fine-tune system performance and enforce persistent kernel settings across reboots.

https://en.wikipedia.org/wiki/Sysctl

Parameters in `/etc/sysctl.conf` are written as key-value pairs, where each line specifies a kernel parameter and its desired value. For example, the entry `vm.swappiness=10` adjusts the swappiness parameter to reduce swap usage. Commonly configured settings include network optimizations (e.g., `net.ipv4.tcp_syncookies` for SYN flood protection) and memory tuning options. Changes to `/etc/sysctl.conf` can be applied immediately using the `sysctl -p` command, ensuring that the system reflects the updated configurations.

https://man7.org/linux/man-pages/man5/sysctl.conf.5.html

Using `/etc/sysctl.conf` is a straightforward way to persist kernel parameter changes, eliminating the need for manual reconfiguration after each reboot. It is widely used in performance tuning, security hardening, and system optimization for servers and desktops alike. Along with runtime tools like `sysctl`, `/etc/sysctl.conf` provides a flexible and powerful interface for managing the Linux Kernel's behavior.

https://www.kernel.org/doc/html/latest/admin-guide/sysctl/index.html