Skip to content

Instantly share code, notes, and snippets.

@akashjobanputra
Last active August 29, 2017 06:02
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 akashjobanputra/8b0f6da5a0097c5163cb27912f579203 to your computer and use it in GitHub Desktop.
Save akashjobanputra/8b0f6da5a0097c5163cb27912f579203 to your computer and use it in GitHub Desktop.
Create & use swap file to temporarily increase swap size
#!/bin/bash
sudo dd if=/dev/zero of=/swap bs=10M count=100 #Creates a file of size 1000M
sudo losetup /dev/loop0 /swap
sudo mkswap /dev/loop0
sudo swapon /dev/loop0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment