Created
July 11, 2020 17:34
-
-
Save furlongm/7884857ebd70f73b85ecc2e059238a26 to your computer and use it in GitHub Desktop.
create-swap-file.sh
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
#sudo fallocate -l 4G /swap | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=4194304 | |
sudo chmod 600 /swap | |
sudo mkswap /swap | |
sudo swapon /swap | |
echo "/swap swap swap defaults 0 0" | sudo tee -a /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment