Thursday, November 3, 2016

sysctl to change kernel system settings

To list all settings configurable in the /proc/sys/ directory:

/sbin/sysctl -a


To assign values to writable files in the /proc/sys/ directory:


sysctl -w [parameter] = [value]

Example:

sysctl -w kernel.sysrq="1"

This only works for testing purposes. Special settings within /proc/sys/ are lost when the 
machine is rebooted. To preserve custom settings, add them to the /etc/sysctl.conf file.
Each time the system boots, the init program runs the /etc/rc.d/rc.sysinit script.
This script contains a command to execute sysctl using /etc/sysctl.conf to determine the
values passed to the kernel.




0 comments:

Post a Comment

Popular Posts

Recent Posts

Unordered List

Text Widget

Pages

Search This Blog

Powered by Blogger.