Created
June 28, 2019 07:47
-
-
Save zengxs/7526298e3fa514fd863e6c06bcdbbe8d 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
#!/bin/sh | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 # 1G | |
sudo chmod 0600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo /swapfile none swap sw 0 0 | sudo tee -a /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment