Posts tagged How to Increase Swap Space

How to add Additional swap Space in linux

Steps to create Additional Swap space :

[email protected][#] dd if=/dev/zero of=/home/.additionalswap bs=1M count=4096

[email protected][#] mkswap /home/.additionalswap

The mkswap command formats a partition to be used as a swap device

[email protected][#] swapon /home/.additionalswap

Swapon is used to specify devices on which paging and swapping are to take place

[email protected][#] swapon -s

Display swap usage summary by device. Equivalent to “cat /proc/swaps”

Then to make the changes permanent open the /etc/fstab

[email protected][#] vi /etc/fstab

And add this line at the end

/home/.additionalswap none swap defaults 0 0

This will make the changes permanent

That’s all you are done.