How to congifure swap partition in Ubuntu

Here are the steps to configure or edit swap space in Ubuntu. The given steps can be use to add more swap area or remove the old swap area from Ubuntu. Before that see what the swap area is.
Swap space is an area on a hard disk. Swap space temporarily holds memory pages that are inactive. If the system happens to need more memory resources or space, inactive pages in RAM are then moved to the swap space therefore freeing up that RAM space for other uses.

Steps to add more swap area to existing swap -

1. Create a partition in the hard disk which will be used as swap area.

2. Let us say I have to add /dev/abc as swap
    Now to make it as swap,
    $mkswap /dev/abc
    Now activate it as swap,
    $swapon /dev/abc

Steps to remove the swap area from the Ubuntu.

Open the terminal and type the following command.
$swapoff  /dev/abc

 where, /dev/abc is the name of the current swap area.

If you want to add at boot time place an entry in fstab

To view how many swap portions are there,

$vim /proc/swaps