I have a swap file in my file system /swapfile
with 2GB, but I want to use a partition.
I created a partition using Gparted.
I removed my swap file using: sudo swapoff /swapfile
But I have a line on /etc/fstab
with my old swapfile.
** I Need To Inform My Ubuntu That I'm Using A Swap Partition. **
How can I achieve this?
I found a solution:
https://ubuntuforums.org/showthread.php?t=2400322
First find the UUID of the swap partition:
sudo blkid | grep 'TYPE="swap"'
Then modify your
/etc/fstab
and replace/swapfile
with UUID=xxx, using the UUID you got from the command above. The line that now has/swapfile
must then look something likeUUID=01234567-89ab-cdef-0123-456789abcdef none swap sw 0 0
The swap partition will be used after a reboot or running
sudo swapon -a