Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Having problem with swap. Actually, in the system monitor it shows swap is not available, and then I installed GParted partition editor.

There is a partition named /dev/sda7 and file system is linux-swap. I turned on swap from there and now everything becomes correct but when I reboot it is unable to persist the change. Again it is showing no swap in the system monitor.

share|improve this question
Take a look at this page. It may help. – bntser Oct 29 '13 at 3:30
Do you use encrypted swap? Then this answer might help – FriendFX Mar 6 '14 at 11:54

Most likely the installation didn't added the swap partition to the fstab. This is easy to solve:

  1. Open a terminal and type sudo blkid:

    sudo blkid
    /dev/sda1: UUID="bf554a2f-a035-4c22-bca8-162def35a03c" TYPE="ext4" 
    /dev/sda2: UUID="3962db06-3776-4f38-8ab9-eab6feeccc1d" TYPE="ext4" 
    /dev/sdb1: UUID="AA64B45A64B42AC9" TYPE="ntfs" 
    /dev/sdb2: UUID="F66E431C6E42D551" TYPE="ntfs" 
    /dev/sdb3: UUID="75a0854b-8b6b-453f-8aec-2a081a1f19e3" TYPE="swap"

    I've marked the swap partition. Save the UUID value.

  2. Edit the /etc/fstab file with whatever editor you like, but for efficiency sake I would tell you two methods:

    • Open the file with an editor using sudo gedit or sudo vim or sudo nano, whichever you like/feel better, then type this lines at the end (be aware the I will be typing my owns since this is an example, you must change the UUID value)

      UUID=75a0854b-8b6b-453f-8aec-2a081a1f19e3 none            swap    sw              0       0
    • Using a one liner. Type the following in a terminal:

      sudo sh -c "echo $UUID 'none swap sw 0 0' >> /etc/fstab
  3. Now reboot your system, then type free:

                 total       used       free     shared    buffers     cached
    Mem:       1533744    1455700      78044          0      89548     690756
    -/+ buffers/cache:     675396     858348
    Swap:      1546232          0    1546232

    As you can see, the total swap is not 0. Same should happen with the system monitor

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.