Skip to content

Instantly share code, notes, and snippets.

@nnzo
Created April 16, 2020 11:07
Show Gist options
  • Save nnzo/2ae9af334a4f0a7468d68d8732586dd7 to your computer and use it in GitHub Desktop.
Save nnzo/2ae9af334a4f0a7468d68d8732586dd7 to your computer and use it in GitHub Desktop.
8GBSwapfile
echo "Creating your 8GB swapfile..."
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
echo "Swapping on"
sudo swapon /swapfile
echo "Making swapfile permanent"
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
echo "All done! run free -m to view your swapfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment