Created
October 24, 2020 13:15
-
-
Save pawelrubin/843ae28c49fefbd391c06205a76ffb80 to your computer and use it in GitHub Desktop.
Resize swap memory, Ubuntu
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
sudo swapoff -a | |
sudo dd if=/dev/zero of=/swapfile bs=1G count=8 | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
# add the new swapfile if it isn’t already there | |
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