Sorry if this isn’t the correct category but I couldn’t find a category that fits.
I am moving my computers from Mint to Manjaro and I always set swappiness from the default 60.
I used my normal terminal command but nothing appeared and I can’t find sysctl.conf in the etc/ directory. I did find it here /etc/ufw/sysctl.conf .
So I added the lines in that sysctl.conf and rebooted.
Apparently that doesn’t do it because checking swappiness it still shows 60.
Any ideas are appreciated.
You’ll have to add the config file in /etc/sysctl.d
see Swap - ArchWiki
I was guessing that I had to add the file but wasn’t sure where and today I learned something new. I think all the Debian/Ubuntu etc. have that file created during install.
To be clear is it 1 or 2 as shown below?
- I edit sysctl.d and add the lines there
- I create a sysctl.conf in the etc directory such as – /etc/sysctl.conf
sudo nano /etc/sysctl.d/99-sysctl.conf and paste your swappiness value in there. Save and exit, reboot and check your swappiness value.
Here is a copy of mine:
chomsky@manjaro ~ $ cat /etc/sysctl.d/99-sysctl.conf
kernel.sysrq = 1
I ran the command and now 99-sysctl exists and looked inside and see that there is a number.
Now I’ll reboot and then check and see if I did everything correct.
Is the difference an Arch thing or Manjaro?
sudo nano /etc/sysctl.d/99-sysctl.conf
You forgot the .conf
Manjaro is based on Arch.
Looks good and that is usually what mine is I’ll try it out.
It is done, swappiness shows it is set at 5.
Now can you help my sore Achilles tendon that I hurt falling off a ladder? Ouch!
Put ice on that bad boy, keep the affected leg raised and take some rest.