Firstly, create a file of 500MB using 'dd'
dd if=/dev/zero of=/home/swapfile bs=1k count=500000
then set appropriate permissions for the filechmod 600 swapfile
make it a swap filemkswap swapfile
and finally activate itswapon swapfile
That's it, you have just added 500MB of swap space. You can check the swap size using the 'free' command. In future if you want to remove the swap space, then do the followingturn swap off
swapoff swapfile
delete the filerm swapfile
That's it.
No comments:
Post a Comment