How To Install systemd-swap on Fedora 36

In this tutorial we learn how to install systemd-swap in Fedora 36. systemd-swap is Creating hybrid swap space from zram swaps, swap files and swap partitions

Introduction

In this tutorial we learn how to install systemd-swap on Fedora 36.

What is systemd-swap

Manage swap on zswap - Enable/Configure zram - Autoconfigurating files - (sparse files for saving space, support btrfs) block devices - auto find and do swapon It is configurable in /etc/systemd/swap.conf

We can use yum or dnf to install systemd-swap on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install systemd-swap.

Install systemd-swap on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install systemd-swap using dnf by running the following command:

sudo dnf -y install systemd-swap

Install systemd-swap on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install systemd-swap using yum by running the following command:

sudo yum -y install systemd-swap

How To Uninstall systemd-swap on Fedora 36

To uninstall only the systemd-swap package we can use the following command:

sudo dnf remove systemd-swap

systemd-swap Package Contents on Fedora 36

/etc/systemd/swap.conf
/usr/bin/systemd-swap
/usr/lib/systemd/system/systemd-swap.service
/usr/share/doc/systemd-swap
/usr/share/doc/systemd-swap/README.md
/usr/share/licenses/systemd-swap
/usr/share/licenses/systemd-swap/LICENSE
/usr/share/man/man1/systemd-swap.1.gz

References

Summary

In this tutorial we learn how to install systemd-swap on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).