Created
May 13, 2018 18:56
-
-
Save zthxxx/de7b8742e600fe731834e7968309f01c to your computer and use it in GitHub Desktop.
create a swap space on ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04 | |
fallocate -l ${SWAP_SIZE:-8G} /swapfile | |
chmod 600 /swapfile | |
swapon /swapfile | |
echo '/swapfile none swap sw 0 0' >> /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment