Last active
September 16, 2020 07:57
-
-
Save esamson33/81f6848b4c7d5f62df5700ffe8cd2dd3 to your computer and use it in GitHub Desktop.
Steps to create a swap file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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