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

I created a swap area with gparted successfully.How can know if swap area is created? I created the swap area after the Ubuntu installation. When i write swapon -s command to terminal there appears one table but it is empty. The "filename option", "size option" are all empty. Why?

share|improve this question

The swapon -s command is what you want to use to see your swap partition that are active.

To know whether you have a swap partition on disk, use parted.

Now what you probably want is to use the swap partition... It should appear in your file /etc/fstab as something that looks like this:

# swap was on /dev/md7 during installation
UUID=4be93050-8c7c-4975-8729-7af473de4847 none            swap    sw              0       0

Once you edited the /etc/fstab, run the swapon command like this to activate your swap:

swapon -a

If you know the UUID of your partition, it is easy to add. Assuming you created that one additional partition, you can find the list here:

ls /dev/disk/by-uuid

and you should be able to deduce what UUID it is (i.e. the one that's not used anywhere else.)

share|improve this answer
does Creating swap area mean that ubuntu is using swap area?And I gave swap area 5 GiB is it much or less? – Maksat Yalkabov Mar 19 '14 at 23:12
When I controlled disk utility i can see my swap area there.When ı write sudo blkid | grep swap this command ı can see like this: UUID=4be93050-8c7c-4975-8729-7af473de4847 Type="Swap" – Maksat Yalkabov Mar 19 '14 at 23:15
Yes, actually I forgot something, once created in the /etc/fstab, you want to start it without rebooting, you need to do a swapon -a – Alexis Wilke Mar 20 '14 at 0:10

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.