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?
1 Answer
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.)
-
does Creating swap area mean that ubuntu is using swap area?And I gave swap area 5 GiB is it much or less? Mar 19, 2014 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" Mar 19, 2014 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
Mar 20, 2014 at 0:10