Why don't I have etc/sysctl.conf - 20 cinnamon

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

1 Like

Ok thanks.

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?

  1. I edit sysctl.d and add the lines there
  2. I create a sysctl.conf in the etc directory such as – /etc/sysctl.conf

Neither

just do:

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
vm.vfs_cache_pressure=50
vm.swappiness=5
1 Like

Thanks

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.

Thanks.

Now can you help my sore Achilles tendon that I hurt falling off a ladder? Ouch! :slight_smile:

1 Like

Put ice on that bad boy, keep the affected leg raised and take some rest.