How Do I Add Swap Space to Ubuntu?
Contents How Do You Add a Space to a Swap in Linux? the Basic Steps to Take Are Simple: Turn off the Existing Swap Space. Create a New Swap Partition of the...
Contents
How do you add a space to a swap in Linux?
The basic steps to take are simple:
- Turn off the existing swap space.
- Create a new swap partition of the desired size.
- Reread the partition table.
- Configure the partition as swap space.
- Add the new partition/etc/fstab.
- Turn on swap.
How do I create a swap partition after installing Ubuntu 20?
Complete the steps below to add swap space on Ubuntu 20.04:
- First, create a file that will be used as swap: sudo fallocate -l 2G /swapfile. …
- Set the file permissions to 600 to prevent regular users to write and read the file: sudo chmod 600 /swapfile.