Last active
January 9, 2024 08:36
-
-
Save koderhun/3ab9d8e3b1a7dd0357a452fed9629cd2 to your computer and use it in GitHub Desktop.
Swapfile enable in ubuntu system
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
# https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04 | |
sudo fallocate -l 10G /swapfile && | |
sudo chmod 600 /swapfile && | |
sudo mkswap /swapfile && | |
sudo cp /etc/fstab /etc/fstab.bak && | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /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