Sysctl settings are stored in the kernel. These settings influence kernel behavior; basically, they're variables of the kernel which programs running on the system can read and write.
When the kernel boots, each sysctl setting has a default value. This value can be changed at any time by a program such as the sysctl
command, or, under Linux, by writing to the corresponding file under /proc/sys
.
The file /etc/sysctl.conf
does not determine the value of the settings at run time. It's only used at boot time, to change some settings from the default value compiled into the kernel. If you've made some changes to /etc/sysctl.conf
, you can apply them as a whole by restarting the sysctl “service” — the sysctl service doesn't correspond to a running process, it's a pseudo-service that just loads the settings into the kernel when it starts.
If you want to change a setting so that the value is preserved across reboots, add it to /etc/sysctl.conf
. To apply a setting temporarily or to try it out, use sysctl
or echo … >/proc/sys/…
.