mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +00:00
1.3 KiB
1.3 KiB
Sysctl
Table of contents
TL;DR
Default configuration files locations:
/run/sysctl.d/*.conf/etc/sysctl.d/*.conf/usr/local/lib/sysctl.d/*.conf/usr/lib/sysctl.d/*.conf/lib/sysctl.d/*.conf/etc/sysctl.conf
# Show the value of a single setting.
sysctl kernel.ostype
sysctl vm.swappiness
# Show the values of all settings.
sysctl -a
# Change the current value of a setting.
sudo sysctl vm.swappiness=10
sudo sysctl -w net.ipv4.ip_forward=1
# Reload settings from specific configuration files.
sudo sysctl -p
sudo sysctl -p /etc/sysctl.d/99-swappiness.conf
# Reload settings from the default configuration files locations.
sudo sysctl --system
# Set up persistent settings.
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
echo 'vm.swappiness = 5' | sudo tee -a /etc/sysctl.d/99-swappiness.conf