Linux 101 : Sysctl and the runtime kernel parameters

Sysctl is a tool that allows us to change the system (kernel) runtime parameters. 
We can see all the kernel parameters using the command:

The list is longer than the one shown above.

Modifying the kernel runtime parameters:

Example ( length of the datagram - Unix Domain Socket - ):

We display the "max_dgram_qlen" parameter using the below command:

We can change its value using the below:

we could also use the below command to modify the value of "max_dgram_qlen" parameter:

It writes the value to the "/proc/sys/net/unix/max_dgram_qlen" file.

Changing the runtine parameters to survive a reboot:

For the parameters to be able to persist after a reboot, we would need to write the modified parameter "net.unix.max_dgram_qlen=value"in the "/etc/sysctl.conf" file.
We use the "/etc/sysctl.conf" file to override the default values of the kernel runtime parameters.


Leave as a comment: