Linux Mint Notes
Here is a collection of Linux Mint notes on a variety of topics. I only tried these on the amd64 Cinnamon editions, and there may be mistakes and omissions; please remember to backup your files before making system changes!
Disable Swap on Linux Mint 19
My computer doesn't have too much RAM, but I don't run anything that intense so I don't use swap and get that storage space back. However small that space is, now it'll be put to good use by the drive's wear leveling.
The Linux Mint 18 installer lets you choose not to use a swap partition, but Linux Mint 19 always uses a swap file located at
/swapfile instead of a separate file system partition.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Turn off swap $ sudo swapoff -a # Edit file systems config $ sudo nano /etc/fstab # Comment out these lines, insert a `#` at the start of each /swapfile none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0 # Edit encrypted block devices config $ sudo nano /etc/crypttab # Comment out this line cryptswap1 /swapfile /dev/urandom swap, ... # Delete the file and reclaim some space! Mine was 1.4GB $ ls -l /swapfile $ sudo rm /swapfile # Finally, reboot for changes to take effect $ reboot
At first I only ran
swapoff -a without editing the files. This caused some issues that added 30s to the kernel boot time (according to
systemd-analyze)! The boot time is back to normal after doing all the others steps.
- : Disable Swap on Linux Mint 19