How To Install lxcfs on Rocky Linux 8

In this tutorial we learn how to install lxcfs on Rocky Linux 8. lxcfs is FUSE based filesystem for LXC

Introduction

In this tutorial we learn how to install lxcfs on Rocky Linux 8.

What is lxcfs

LXCFS is a simple userspace filesystem designed to work around some current limitations of the Linux kernel. Specifically, it’s providing two main things - A set of files which can be bind-mounted over their /proc originals to provide CGroup-aware values. - A cgroupfs-like tree which is container aware. The code is pretty simple, written in C using libfuse. The main driver for this work was the need to run systemd based containers as a regular unprivileged user while still allowing systemd inside the container to interact with cgroups. Now with the introduction of the cgroup namespace in the Linux kernel, that part is no longer necessary on recent kernels and focus is now on making containers feel more like a real independent system through the proc masking feature.

We can use yum or dnf to install lxcfs on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install lxcfs.

Install lxcfs on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install lxcfs

Install lxcfs on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install lxcfs using yum by running the following command:

sudo yum -y install lxcfs

How To Uninstall lxcfs on Rocky Linux 8

To uninstall only the lxcfs package we can use the following command:

sudo dnf remove lxcfs

lxcfs Package Contents on Rocky Linux 8

/usr/bin/lxcfs
/usr/lib/.build-id
/usr/lib/.build-id/46
/usr/lib/.build-id/46/fce5491cd6e8678ce6dcf46f68678213c04a55
/usr/lib/.build-id/cc
/usr/lib/.build-id/cc/3a86a8000acce947a84e049673da1ecece4173
/usr/lib/systemd/system/lxcfs.service
/usr/lib64/lxcfs
/usr/lib64/lxcfs/liblxcfs.so
/usr/share/doc/lxcfs
/usr/share/doc/lxcfs/AUTHORS
/usr/share/licenses/lxcfs
/usr/share/licenses/lxcfs/COPYING
/usr/share/lxc/config/common.conf.d/00-lxcfs.conf
/usr/share/lxcfs
/usr/share/lxcfs/lxc.mount.hook
/usr/share/lxcfs/lxc.reboot.hook
/usr/share/man/man1/lxcfs.1.gz
/var/lib/lxcfs

References

Summary

In this tutorial we learn how to install lxcfs on Rocky Linux 8 using yum and dnf.