Ubuntu – How to reload sysctl from sysctl.d directory

Ubuntu

I am making changes to a file in the /etc/sysctl.d directory (Ubuntu 12.04).

I know that sysctl -p reloads from /etc/sysctl.conf but it doesn't seem to work for anything under the /etc/sysctl.d/ directory. A reboot works, but I'd like to do it without a reboot.

Any suggestions?

Best Answer

As documented, for recent util-linux versions:

# Load settings from all system configuration files
sysctl --system

For older versions (that is, if --system does not work):

# Load settings from /etc/sysctl.conf
sysctl -p
# Load settings from the specified file
sysctl -p /etc/sysctl.d/<whatever>.conf
Related Question