Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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? –  user255742 Mar 19 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" –  user255742 Mar 19 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 at 0:10
add comment

Your Answer

 
discard

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.