Skip to content

Instantly share code, notes, and snippets.

@esamson33
Last active September 16, 2020 07:57
Show Gist options
  • Save esamson33/81f6848b4c7d5f62df5700ffe8cd2dd3 to your computer and use it in GitHub Desktop.
Save esamson33/81f6848b4c7d5f62df5700ffe8cd2dd3 to your computer and use it in GitHub Desktop.
Steps to create a swap file
#!/bin/bash
# Create a swap file with 8GB size
dd if=/dev/zero of=/swapfile bs=8192 count=1048576
mkswap /swapfile
swapon /swapfile
# Add to /etc/fstab
# device target fs options dump pass
# /swapfile none swap sw 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment