Skip to content

Instantly share code, notes, and snippets.

@Mexidense
Created January 23, 2021 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mexidense/47bfa9185eb32b29dcdd0d10c2fb859e to your computer and use it in GitHub Desktop.
Save Mexidense/47bfa9185eb32b29dcdd0d10c2fb859e to your computer and use it in GitHub Desktop.
Resize Swap volume on Ubuntu 20.04 to 8GB
#!/bin/sh
# Firstly, if you want to check the swap memory size run: swapon -s
# Resize Swap volume to 8GB
sudo swapoff -a && sudo dd if=/dev/zero of=/swapfile bs=1M count=8192 && sudo mkswap /swapfile && sudo swapon /swapfile
@Mexidense
Copy link
Author

Mexidense commented Jan 25, 2021

Flush some memory:

echo 3 | sudo tee /proc/sys/vm/drop_caches

source: https://www.linuxatemyram.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment