Skip to content

Instantly share code, notes, and snippets.

@furlongm
Created July 11, 2020 17:34
Show Gist options
  • Save furlongm/7884857ebd70f73b85ecc2e059238a26 to your computer and use it in GitHub Desktop.
Save furlongm/7884857ebd70f73b85ecc2e059238a26 to your computer and use it in GitHub Desktop.
create-swap-file.sh
#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