Skip to content

Instantly share code, notes, and snippets.

@SeanChristopherConway
Created November 27, 2017 06:25
Show Gist options
  • Save SeanChristopherConway/324cfc80b354ea21fc66278ef734656e to your computer and use it in GitHub Desktop.
Save SeanChristopherConway/324cfc80b354ea21fc66278ef734656e to your computer and use it in GitHub Desktop.
Install zram on a linux box(tested on raspberry pi jessie, stretch and also on ubuntu 16)
sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/novaspirit/rpi_zram/master/zram.sh
sudo chmod +x /usr/bin/zram.sh
sudo chmod +x /usr/bin/zram.sh
sudo nano /lib/systemd/system/zram.service
---- copy below to the file you just nano'd
[Unit]
Description=Enables zram
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/zram.sh > /home/pi/zram.log 2>&1
[Install]
WantedBy=multi-user.target
---- end copy
sudo chmod 644 /lib/systemd/system/zram.service
sudo systemctl daemon-reload
sudo systemctl enable zram.service
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment