Inspect and change Linux kernel settings at runtime to tune networking, security and performance. 10.05.2026 | reading time: 2 min When a kernel switch can fix a network problem or harden a host, sysctl puts control in your hands; this page shows how to read, change and persist kernel parameters from the command line so you can act fast and safely. Quick hands-on: enable IP forwarding Try this short demo to see sysctl in action: ``` $ sysctl net.ipv4.ip_forward net.ipv4.ip_forward = 0 $ sudo sysctl -w net.ipv4.ip_forward=1 net.ipv4.ip_forward = 1 $ cat /proc/sys/net/ipv4/ip_forward 1 $ sudo sysctl -w net.ipv4.ip_forward=0 net.ipv4.ip_forward = 0 ``` Make it permanent A temporary change vanishes after reboot; persist it with a sysctl config and reload: ``` $ echo "net.ipv4.ip_forward = 1" | sudo tee /etc/sysctl.d/99-local.conf net.ipv4.ip_forward = 1 $ sudo sysctl --system loading from /etc/sysctl.d/99-local.conf net.ipv4.ip_forward = 1 ```This uses the /etc/sysctl.d directory so local settings survive upgrades. When to tweak values Use sysctl for network tuning like TCP parameters and forwarding, security hardening such as disabling packet redirects, VM and memory limits for performance, and quick troubleshooting when a kernel-side knob is suspected; change carefully and always document the reasoning. Other tools nearby sysctl is one interface to the kernel; you can also read and write values directly under /proc/sys, dump everything with `sysctl -a` for inspection, and script changes from configuration files in /etc/sysctl.d or /etc/sysctl.conf so automation and audits remain straightforward. Final word sysctl is a small tool with big impact: use it to experiment, then persist the proven settings and monitor results; deepen your Linux knowledge and consider formal certification such as CompTIA Linux+ or LPIC-1, with bitsandbytes.academy offering intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. utilities security network boot-process processes troubleshooting