Created
November 22, 2017 20:40
-
-
Save th0th/a34525b62dd86cee41dfac808939b87b to your computer and use it in GitHub Desktop.
Create swap file (2 GB) and activate
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 | |
dd if=/dev/zero of=/swapfile bs=1M count=2048 | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile none swap defaults 0 0" >> /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment