Skip to content

Instantly share code, notes, and snippets.

@skt-bford
Created February 22, 2013 20:22
Show Gist options
  • Save skt-bford/5016293 to your computer and use it in GitHub Desktop.
Save skt-bford/5016293 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
dd if=/dev/zero of=/swapfile bs=1024 count=512k
mkswap /swapfile
swapon /swapfile
echo "
/swapfile swap swap defaults 0 0" >>/etc/fstab
chmod 0600 /swapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment