-
-
Save emj365/aeb70cde01da7f03617fb3d891234ba8 to your computer and use it in GitHub Desktop.
this file add 4GB swap file to ubuntu 14.04 x64
This file contains 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
#!/bin/bash | |
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo "/swapfile none swap sw 0 0" >> /etc/fstab | |
echo "Added!" | |
free -m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment