Skip to content

Instantly share code, notes, and snippets.

@ArchieR7
Created May 4, 2017 12:44
Show Gist options
  • Save ArchieR7/0a01185a59c73d177271cb641ecefe89 to your computer and use it in GitHub Desktop.
Save ArchieR7/0a01185a59c73d177271cb641ecefe89 to your computer and use it in GitHub Desktop.
swap disk to ram
cd /var
touch swap.img
chmod 600 swap.img
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
# swapoff /var/swap.img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment