rasti.hil@hilandco.com +41 79 367-9677

Search This Blog

Extending swap space

Recently I have run into a problem when I want to install some program on my Ubuntu machine.
The problem was that the program figured out that the machine has not have enough swap space so i had to extend it:

Step 1.: create a swap file;
sudo dd if=/dev/zero of=/extraswap.img bs=1M count=500
this command would create an 500MB file.

Step 2.: alter the create file
sudo touch /extraswap.img

Step 3.: "turn it on" as a swap file
sudo swapon /extraswap.img

Step 4.: add entries to /etc/fstab file
/extraswap.img none swap defaults 0 0

janos ujvari @ 14th, October 2008