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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326059955&siteId=291194637