Skip to content

Instantly share code, notes, and snippets.

@codebymark
Last active August 16, 2019 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codebymark/0f5c3c1cf06d66a02b690380cd0dc342 to your computer and use it in GitHub Desktop.
Save codebymark/0f5c3c1cf06d66a02b690380cd0dc342 to your computer and use it in GitHub Desktop.
sudo su
dd if=/dev/zero of=/swapfile bs=1M count=2000
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon -s
nano /etc/fstab
Add this text to the bottom:
/swapfile swap swap defaults 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment