To create SWAP space/file in your system, you just need to follow below simple steps. First we shall see how much free space we are having using free -k or swapon -s command.
shankar@shankar-desktop ~ $ free -k
total used free shared buffers cached
Mem: 2061716 936484 1125232 0 43624 367612
-/+ buffers/cache: 525248 1536468
Swap: 492536 0 492536
shankar@shankar-desktop ~ $ swapon -s
...
Read more »