linux add swap

[url]https://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

[/url]

dd if=/dev/zero of=/mnt/1GB.swap bs=1024 count=4096000
chown root:root /swapfile1
chmod 0600 /swapfile1
mkswap /swapfile1
swapon /swapfile1
vi /etc/fstab

/swapfile1 none swap sw 0 0

free -m
swapon -s

相关推荐