Created
August 6, 2024 17:10
-
-
Save RxDx/79724c55b2e47af8660d4f8a0c9a5daa to your computer and use it in GitHub Desktop.
VPS Set Up SWAP Partition
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
# Check Existing SWAP | |
swapon --show | |
# Set Up SWAP | |
fallocate -l 2G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
# Make SWAP Persistant Across Reboots | |
echo "/swapfile none swap sw 0 0" >> /etc/fstab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment