Skip to content

Instantly share code, notes, and snippets.

@teiling88
Created February 20, 2017 09:46
Show Gist options
  • Save teiling88/afc98c995c18ded9fde304cbac8f8c30 to your computer and use it in GitHub Desktop.
Save teiling88/afc98c995c18ded9fde304cbac8f8c30 to your computer and use it in GitHub Desktop.
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon --show
cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 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