Last active
August 29, 2016 16:52
-
-
Save NamPNQ/6ade72f62cdbb213730483260acdc0d5 to your computer and use it in GitHub Desktop.
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
# Sudo | |
sudo su | |
# Check | |
swapon -s | |
# Create swap file | |
fallocate -l 10G /swapfile && chmod 600 /swapfile # or dd if=/dev/zero of=/swapfile bs=1M count=2048 | |
# Make swapfile a Linux-managed swap area | |
mkswap /swapfile | |
# Activate swap temporary | |
swapon /swapfile | |
# Automatic, insert /etc/fstab | |
/swapfile none swap sw 0 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment