# All commands must be run as root except the final section. fallocate -l 1G /swapfile # 1 GB file chmod 600 /swapfile # root only read-write mkswap /swapfile #swapon /swapfile echo "/swapfile none swap sw 0 0" >> /etc/fstab # make sure it functions after reboot mount -a free -m # make sure it is working now
Comments