_ap_ufes{"success":true,"siteUrl":"www.jucktion.com/tech","urls":{"Home":"https://www.jucktion.com/tech","Category":"https://www.jucktion.com/tech/c/mobile/android/","Archive":"https://www.jucktion.com/tech/2018/01/","Post":"https://www.jucktion.com/tech/incoming-remote-desktop-windows-home/","Page":"https://www.jucktion.com/tech/about/","Attachment":"https://www.jucktion.com/tech/incoming-remote-desktop-windows-home/windows-10-home-rdp-setup/","Nav_menu_item":"https://www.jucktion.com/tech/3985/"}}_ap_ufee Enable/Disable Swap on Ubuntu at startup

Enable/Disable Swap on Ubuntu at startup

By | 11th August, 2012 | 0 Comments

If you are new to Ubuntu then you might be wondering what is Swap? Swap is a space created on your hard disk as a Virtual Memory and used to store memory pages for applications when your have less free RAM, you can read more about Swap and Ubuntu at Swapfaq.

Normally swap partitions are advised to be created at the time of installation, but it can be resized with partition editors later. Once swap partition is created, you can view the swap usage on system monitor on Ubuntu, But if by any chance you see that Swap is not being used then you might have to try this to enable it on the start up. You can manually enable or disable swap usage from Gparted Partition Editor.

For enabling swap on startup, you have to check your fstab file to see if some there has been some changes to be made since you first made swap. Edit the fstab file with gedit with the sudo command.

sudo gedit /etc/fstab
gedit fstab

fstab edit

This will open the geditor to edit the fstab settings. Check to see if the line having swap hasn’t been commented out with a ‘#‘ sign at the beginning. If it is you’ll have to remove it for Swap to be enabled at boot. If it isn’t then you have to check the UUID to see if it matches the UUID of the swap partition.

To check you can use Gparted, left click on the partition labled linux-swap and view information. There you will find the UUID for the partition. You’ll have to replace the UUID on the fstab file with this one to enable swap at startup.

Then save the fstab file on gedit, and recheck any mistakes. Do not make any changes to other lines if you don’t know what you’re doing. Then restart Ubuntu.

Tags: , , ,

Category: Cool Hacks, Linux