Skip to content

Instantly share code, notes, and snippets.

@stepanmas
Last active March 7, 2023 12:11
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 stepanmas/bf5b7d18b5aa7503c939cbaca6c582ce to your computer and use it in GitHub Desktop.
Save stepanmas/bf5b7d18b5aa7503c939cbaca6c582ce to your computer and use it in GitHub Desktop.
fallocate -l 3G /swapfile
chmod 600 /swapfile
mkswap /swapfile
dd if=/dev/zero of=/swapfile bs=1G count=16
echo -e "/swapfile none swap sw 0 0 \n" >> /etc/fstab
swapon /swapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment