How Do I Permanently Disable Swap in Linux?
Contents How Do I Permanently Disable Swap in Ubuntu? the Solution Is Quite Simple Anyways; to Permanently Disable Swap You Must: Swapoff -A. Edit /Etc/Fstab...
Contents
How do I permanently disable swap in Ubuntu?
The solution is quite simple anyways; to permanently disable swap you must:
- swapoff -a.
- edit /etc/fstab and comment any swap entries if present (you might be able to skip this step 2, and step 3 without step 2 may work for you).
- run: sudo systemctl mask “dev-sdXX. swap” (where XX is the swap partition.
How do I turn off swap memory?
To clear the swap memory on your system, you simply need to cycle off the swap. This moves all data from swap memory back into RAM. It also means that you need to be sure you have the RAM to support this operation. An easy way to do this is to run ‘free -m’ to see what is being used in swap and in RAM.