Subscribe:

Ads 468x60px

Pages

Wednesday, May 25, 2011

Creating swap file


To create 64MB swap file on your root partition
# dd if=/dev/zero of=/swapfile bs=1024 count=65536

Set up a Linux swap area
# mkswap /swapfile

Activate the swap file
# swapon /swapfile

To activate /swapfile1 after Linux system reboot, add entry to /etc/fstab file:
# vi /etc/fstab

Append following line:
/swapfile1 swap swap defaults 0 0

Verify swap is activated or not
# free -m


Please feel free to comment to make it more useful to everyone.

0 comments:

Post a Comment