Skip to content

Instantly share code, notes, and snippets.

@carlos8f
Created June 30, 2015 15:35
Show Gist options
  • Save carlos8f/1413a6c55c7a5dce6485 to your computer and use it in GitHub Desktop.
Save carlos8f/1413a6c55c7a5dce6485 to your computer and use it in GitHub Desktop.
swap partition on ubuntu ec2
sudo dd if=/dev/zero of=/var/swapfile bs=1M count=4096
sudo chmod 600 /var/swapfile
sudo mkswap /var/swapfile
echo /var/swapfile none swap defaults 0 0 | sudo tee -a /etc/fstab
sudo swapon -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment