Created
September 10, 2018 14:47
-
-
Save emersonmx/be1efa95d111fdd738800478794adcc7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# 1GB swap | |
dd if=/dev/zero of=/swapfile1 bs=1024 count=1048576 | |
chown root:root /swapfile1 | |
chmod 0600 /swapfile1 | |
mkswap /swapfile1 | |
swapon /swapfile1 | |
# add to /etc/fstab | |
# /swapfile1 none swap sw 0 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment