Thursday, August 21, 2008

Adding swap file to linux

there are three steps to add a new swap file to a linux box.
1- you have to create the swap file
dd if=/dev/zero of=swapfile bs=1024 count=1536000
2- run this command to identify the file as a swap file
mkswap /swapfile/swapfile
3- and activate it:
swapon /swapfile/swapfile

No comments: