Created
May 28, 2015 13:59
-
-
Save aliuygur/747085c940d9b96681f3 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