sysctl [variable] such as
sysctl vm.swappiness will print out the value of
vm.swappiness. But when I tried
sysctl vm.swappiness=10 and then typed
sysctl vm.swappiness, it showed that
vm.swappiness = 10 (it was 60 before). I thought to change a
sysctl setting, you had to do
sysctl -w [variable] such as
sysctl -w vm.swappiness=10.
Is there a difference between
sysctl vm.swappiness=10 and
sysctl -w vm.swappiness=10?
I thought that
sysctl -w vm.swappiness=10 might edit
/etc/sysctl.conf directly, but that does not seem to be the case because when I entered
sysctl -w vm.swappiness=10 and then looked at
vm.swappiness was still set to 60. Then, when I did
vm.swappiness became 60 again.
So additionally, does
sysctl -w configure
/etc/sysctl.conf in any way?