Enable zram with exactly 2 devices

zramctl

  • Setup and control zram devices.
    Use `mkfs` or `mkswap` to format zram devices to partitions.
    More information: <https://manned.org/zramctl>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

sudo modprobe zram num_devices={{2}}

click the source code to copy install zramctl on any operating system with command-not-found.com