Created
February 20, 2025 21:30
-
-
Save tito/fddb0bbb244dc93e1b965eb218f796b1 to your computer and use it in GitHub Desktop.
Digitalocean swap
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
fallocate -l 2G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
swapon --show | |
free -h | |
cp /etc/fstab /etc/fstab.bak | |
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment