How to check if there is already a swap area?


Answer: 1

28 hours ago

I am using Ubuntu 14.04 on my laptop with 4 GB RAM. I had chosen option to "replace Windows 8 and install Ubuntu with LVM" when installing Ubuntu. Now I wanted to create a swap partition, I executed following commands:

sudo fallocate -l 2048m /mnt/swap_file.swap
sudo chmod 600 /mnt/swap_file.swap
sudo mkswap /mnt/swap_file.swap
sudo swapon /mnt/swap_file.swap

Then when I opened my editor to edit /etc/fstab it already had an entry for swap as:

/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0

So I did following commands:

sudo swapoff /mnt/swap_file.swap
sudo rm /mnt/swap_file.swap

Now my question is if there is already an swap area how can I check its size and how can I increase it if I want. Any help will be appreciated.

Added by: Augusta Hand

Answer: 2

2 hours ago

There are many ways for it, here are my favourite ones-

  1. Type in the terminal and press Enter:

     cat /proc/swaps
  2. Type in the terminal and press Enter:

    swapon -s
  3. Type in the terminal and press Enter:

Added by: Matt Monahan

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9