Why use /etc/sysctl.conf?
we use for some kernel parameters: (for example net.ipv4.ip.forward)
- in /proc/sys/net/ivp4/ip_forward is "live kernel data"
It's not necessary explain each command (sysctl -p = p = load parameters from file)
[root@Mr ~]# cat /proc/sys/net/ipv4/ip_forward
0
[root@Mr ~]# vi /etc/sysctl.conf
[root@Mr ~]# cat /etc/sysctl.conf | grep -i ipv4
net.ipv4.ip_forward=1
[root@Mr ~]#
[root@Mr ~]# sysctl -p
net.ipv4.ip_forward = 1
[root@Mr ~]# cat /proc/sys/net/ipv4/ip_forward
1
[root@Mr ~]#
more: https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html
Žiadne komentáre:
Zverejnenie komentára