HostOnNet Blog


swap

To add swap file to linux system, run

dd if=/dev/zero of=/swapfile bs=1M count=1024
mkswap /swapfile
swapon /swapfile

To make it active on boot, edit /etc/fstab, add

vi /etc/fstab

Add

/swapfile swap swap defaults 0 0

Posted in Linux