Created
May 20, 2026 21:48
-
-
Save Drewlius/08a66f8df836c65b5643a1975918b3d8 to your computer and use it in GitHub Desktop.
script to disable ZRAM and Swap in one command.
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
| #!/bin/bash | |
| sudo swapoff -a;sudo zramctl --reset /dev/zram0;echo "ensure if a ZRAM line is configured that you remove it now";sleep 10;wait;sudo nano /etc/fstab;sudo systemctl mask --now systemd-zram-setup@zram0.service;sudo touch /etc/systemd/zram-generator.conf;echo "Here you are going to write vm.swappiness=0, save(ctrl+s), and then exit(ctrl+x, Enter)";sleep 10;wait;sudo nano /etc/sysctl.d/99-swappiness.conf;echo "ZRAM is OFF";sleep 3;wait;exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment