Skip to content

diogopessoa/ubuntu-zram-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ubuntu zRAM Setup

This script automates the removal of the slower virtual memory swapfile and installs/configures zRAM as swap, which provides faster and more modern memory swapping for Linux and Ubuntu-based systems.

πŸš€ Features

  • Removes the old and slow swapfile
  • Enables ZRAM as swap using zram-config
  • Installs and activates EarlyOOM (a mechanism that prevents system freezes due to low memory)

πŸ› οΈ Requirements

  • Ubuntu 24.04 and later or derivatives (Kubuntu, Linux Mint, Zorin OS...)

πŸ“¦ Installation and Usage

  1. Clone the repository or download the script and save it to your *Downloads folder:
cd ~/Downloads
wget https://github.com/diogopessoa/ubuntu-zram-setup/blob/main/ubuntu-zram-setup.sh
  1. Make the script executable:
chmod +x ubuntu-zram-setup.sh
  1. Run the script as root:
sudo ./ubuntu-zram-setup.sh

πŸ§ͺ Post-Execution Checks

You can use the following commands to verify everything was configured correctly:

zramctl
swapon --show
systemctl status zram-config
systemctl status earlyoom

πŸ“‚ License

MIT β€” feel free to use, modify, and contribute!

About

Script to configure ZRAM, remove swapfile, and enable EarlyOOM on Ubuntu and derivatives.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages