Skip to content

Instantly share code, notes, and snippets.

@Jeckerson
Created September 21, 2019 12:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jeckerson/2322849d9f5dbbc9543c99e49341177e to your computer and use it in GitHub Desktop.
Save Jeckerson/2322849d9f5dbbc9543c99e49341177e to your computer and use it in GitHub Desktop.
Create swap file on Linux
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile none swap sw 0 0" | tee -a /etc/fstab
@RajuHarry
Copy link

Thanks For this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment