Skip to content

Instantly share code, notes, and snippets.

@grigio
Created April 27, 2015 21:14
Show Gist options
  • Save grigio/623f31e917fccc4fbdbd to your computer and use it in GitHub Desktop.
Save grigio/623f31e917fccc4fbdbd to your computer and use it in GitHub Desktop.
enable swapfile
sudo fallocate -l 4G /swapfile
sudo mkswap /swapfile
sudo chmod 600 /swapfile
# "UUID" & create
#SWAP_UUID=`sudo blkid -s UUID /swapfile | grep -Po '[\w*-]*\w'| tail -1`
echo "/swapfile none swap sw 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