Created
February 18, 2014 15:39
-
-
Save edymerchk/9073313 to your computer and use it in GitHub Desktop.
how-to-add-swap-on-ubuntu-12-04
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
| full explanation: https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04 | |
| sudo dd if=/dev/zero of=/swapfile bs=1024 count=512k | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile | |
| echo 0 | sudo tee /proc/sys/vm/swappiness | |
| echo vm.swappiness = 0 | sudo tee -a /etc/sysctl.conf | |
| sudo chown root:root /swapfile | |
| sudo chmod 0600 /swapfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment