zramswap command not found

In this troubleshooting guide we learn how to fix zramswap command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

zramswap: command not found

or when using sudo you get the following error message

sudo: zramswap: command not found

Solutions to zramswap: command not found

How To Fix zramswap: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu zramswap is provided by zram-tools package.

zram-tools is:

zram is a Linux kernel module that allows you to set up compressed filesystems in RAM.

zram-tools uses this module to set up compressed swap space. This is useful on systems with low memory or servers running a large amount of services with data that’s easily swappable but that you may wish to swap back fast without sacrificing disk bandwidth.

By default it allocates 100MB of RAM, you can configure this in /etc/default/zramswap.

To fix this problem, we can install more using the command below.

sudo apt-get -y install zram-tools

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install zram-tools.

sudo apt -y install zram-tools

Or if you have aptitude installed you can use the following command.

sudo aptitude install zram-tools

Summary

In this tutorial we learn how to fix zramswap command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.