How To Install lxc on Fedora 34

lxc is Linux Resource Containers

Introduction

In this tutorial we learn how to install lxc on Fedora 34.

What is lxc

Linux Resource Containers provide process and resource isolation without the overhead of full virtualization.

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

Install lxc on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install lxc

Install lxc on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo yum -y install lxc

How To Uninstall lxc on Fedora 34

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

sudo dnf remove lxc

lxc Package Contents on Fedora 34

/usr/bin/lxc-attach
/usr/bin/lxc-cgroup
/usr/bin/lxc-checkconfig
/usr/bin/lxc-checkpoint
/usr/bin/lxc-config
/usr/bin/lxc-console
/usr/bin/lxc-copy
/usr/bin/lxc-create
/usr/bin/lxc-destroy
/usr/bin/lxc-device
/usr/bin/lxc-execute
/usr/bin/lxc-freeze
/usr/bin/lxc-info
/usr/bin/lxc-ls
/usr/bin/lxc-monitor
/usr/bin/lxc-snapshot
/usr/bin/lxc-start
/usr/bin/lxc-stop
/usr/bin/lxc-top
/usr/bin/lxc-unfreeze
/usr/bin/lxc-unshare
/usr/bin/lxc-update-config
/usr/bin/lxc-usernsexec
/usr/bin/lxc-wait
/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/e60aadfa71d5670ddbb74966b93a50a87d2b96
/usr/lib/.build-id/07
/usr/lib/.build-id/07/04b68d72aa18eff65a5f57a5a39e2a3607fa4a
/usr/lib/.build-id/1f
/usr/lib/.build-id/1f/923762f64ede5acd0e91bc2c2d7e2758068b74
/usr/lib/.build-id/27
/usr/lib/.build-id/27/22fefae4d1fc9eed7a9a3a1f6dbffc64a3279f
/usr/lib/.build-id/31
/usr/lib/.build-id/31/9ae0e30c0c17123d155ba49a126c37a6ef47d2
/usr/lib/.build-id/40
/usr/lib/.build-id/40/cf28285401828cc8d0fa5523d79f62b6854170
/usr/lib/.build-id/47
/usr/lib/.build-id/47/17c40bb30beb0c5e3c2925d6d1c6a46a736726
/usr/lib/.build-id/50
/usr/lib/.build-id/50/e4038f1f5ea9b6fc20b766f953e222faeeb986
/usr/lib/.build-id/65
/usr/lib/.build-id/65/208e137beb1588c219060c14a55ed37c924474
/usr/lib/.build-id/7d
/usr/lib/.build-id/7d/8f7de2d8c2b9dc5a759e79ed2457f6c6fa1d28
/usr/lib/.build-id/87
/usr/lib/.build-id/87/22e96475deb062818f9ef5f9e7d6629f3706cb
/usr/lib/.build-id/89
/usr/lib/.build-id/89/d4b15933833cfc541d9872a2dd6a3a731622b8
/usr/lib/.build-id/8f
/usr/lib/.build-id/8f/69fe3738305c0b0dc35323cda40fa9621a55bd
/usr/lib/.build-id/97
/usr/lib/.build-id/97/2f571e52bf4703204e5e14aca4d239f0d5ddde
/usr/lib/.build-id/99
/usr/lib/.build-id/99/c02848533ad1afd1e86018f698b2e0dc9c8ca3
/usr/lib/.build-id/9a
/usr/lib/.build-id/9a/bb3e1be4da8281fcfeccf673f9263fe5a19057
/usr/lib/.build-id/c3
/usr/lib/.build-id/c3/220e7fe25c86e505637c07fb9d1c34e87de064
/usr/lib/.build-id/cd
/usr/lib/.build-id/cd/26c2b5e2e9ce3b9a7e0f50c5d345633f014d66
/usr/lib/.build-id/dd
/usr/lib/.build-id/dd/3cd55d2a45118a2fe5fcbef47a88d0f6a8122d
/usr/lib/.build-id/ec
/usr/lib/.build-id/ec/222bd2948292a07bfb2ff8888f10824d4f5600
/usr/lib/.build-id/f2
/usr/lib/.build-id/f2/26ddbc6a1e1c308f657ac07b596d65a81e7565
/usr/lib/.build-id/f3
/usr/lib/.build-id/f3/add2c38d88ad6d46d44fe7387b4d51e2b9294a
/usr/lib/.build-id/f6
/usr/lib/.build-id/f6/a0cdba6e6de5cbd7d31d416f5d8dacb97e2442
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/lxc
/usr/share/lxc/lxc.functions
/usr/share/man/ja/man1/lxc-attach.1.gz
/usr/share/man/ja/man1/lxc-cgroup.1.gz
/usr/share/man/ja/man1/lxc-checkconfig.1.gz
/usr/share/man/ja/man1/lxc-checkpoint.1.gz
/usr/share/man/ja/man1/lxc-config.1.gz
/usr/share/man/ja/man1/lxc-console.1.gz
/usr/share/man/ja/man1/lxc-copy.1.gz
/usr/share/man/ja/man1/lxc-create.1.gz
/usr/share/man/ja/man1/lxc-destroy.1.gz
/usr/share/man/ja/man1/lxc-device.1.gz
/usr/share/man/ja/man1/lxc-execute.1.gz
/usr/share/man/ja/man1/lxc-freeze.1.gz
/usr/share/man/ja/man1/lxc-info.1.gz
/usr/share/man/ja/man1/lxc-ls.1.gz
/usr/share/man/ja/man1/lxc-monitor.1.gz
/usr/share/man/ja/man1/lxc-snapshot.1.gz
/usr/share/man/ja/man1/lxc-start.1.gz
/usr/share/man/ja/man1/lxc-stop.1.gz
/usr/share/man/ja/man1/lxc-top.1.gz
/usr/share/man/ja/man1/lxc-unfreeze.1.gz
/usr/share/man/ja/man1/lxc-unshare.1.gz
/usr/share/man/ja/man1/lxc-update-config.1.gz
/usr/share/man/ja/man1/lxc-usernsexec.1.gz
/usr/share/man/ja/man1/lxc-wait.1.gz
/usr/share/man/ko/man1/lxc-attach.1.gz
/usr/share/man/ko/man1/lxc-cgroup.1.gz
/usr/share/man/ko/man1/lxc-checkconfig.1.gz
/usr/share/man/ko/man1/lxc-checkpoint.1.gz
/usr/share/man/ko/man1/lxc-config.1.gz
/usr/share/man/ko/man1/lxc-console.1.gz
/usr/share/man/ko/man1/lxc-copy.1.gz
/usr/share/man/ko/man1/lxc-create.1.gz
/usr/share/man/ko/man1/lxc-destroy.1.gz
/usr/share/man/ko/man1/lxc-device.1.gz
/usr/share/man/ko/man1/lxc-execute.1.gz
/usr/share/man/ko/man1/lxc-freeze.1.gz
/usr/share/man/ko/man1/lxc-info.1.gz
/usr/share/man/ko/man1/lxc-ls.1.gz
/usr/share/man/ko/man1/lxc-monitor.1.gz
/usr/share/man/ko/man1/lxc-snapshot.1.gz
/usr/share/man/ko/man1/lxc-start.1.gz
/usr/share/man/ko/man1/lxc-stop.1.gz
/usr/share/man/ko/man1/lxc-top.1.gz
/usr/share/man/ko/man1/lxc-unfreeze.1.gz
/usr/share/man/ko/man1/lxc-unshare.1.gz
/usr/share/man/ko/man1/lxc-usernsexec.1.gz
/usr/share/man/ko/man1/lxc-wait.1.gz
/usr/share/man/man1/lxc-attach.1.gz
/usr/share/man/man1/lxc-cgroup.1.gz
/usr/share/man/man1/lxc-checkconfig.1.gz
/usr/share/man/man1/lxc-checkpoint.1.gz
/usr/share/man/man1/lxc-config.1.gz
/usr/share/man/man1/lxc-console.1.gz
/usr/share/man/man1/lxc-copy.1.gz
/usr/share/man/man1/lxc-create.1.gz
/usr/share/man/man1/lxc-destroy.1.gz
/usr/share/man/man1/lxc-device.1.gz
/usr/share/man/man1/lxc-execute.1.gz
/usr/share/man/man1/lxc-freeze.1.gz
/usr/share/man/man1/lxc-info.1.gz
/usr/share/man/man1/lxc-ls.1.gz
/usr/share/man/man1/lxc-monitor.1.gz
/usr/share/man/man1/lxc-snapshot.1.gz
/usr/share/man/man1/lxc-start.1.gz
/usr/share/man/man1/lxc-stop.1.gz
/usr/share/man/man1/lxc-top.1.gz
/usr/share/man/man1/lxc-unfreeze.1.gz
/usr/share/man/man1/lxc-unshare.1.gz
/usr/share/man/man1/lxc-update-config.1.gz
/usr/share/man/man1/lxc-usernsexec.1.gz
/usr/share/man/man1/lxc-wait.1.gz
/usr/bin/lxc-attach
/usr/bin/lxc-cgroup
/usr/bin/lxc-checkconfig
/usr/bin/lxc-checkpoint
/usr/bin/lxc-config
/usr/bin/lxc-console
/usr/bin/lxc-copy
/usr/bin/lxc-create
/usr/bin/lxc-destroy
/usr/bin/lxc-device
/usr/bin/lxc-execute
/usr/bin/lxc-freeze
/usr/bin/lxc-info
/usr/bin/lxc-ls
/usr/bin/lxc-monitor
/usr/bin/lxc-snapshot
/usr/bin/lxc-start
/usr/bin/lxc-stop
/usr/bin/lxc-top
/usr/bin/lxc-unfreeze
/usr/bin/lxc-unshare
/usr/bin/lxc-update-config
/usr/bin/lxc-usernsexec
/usr/bin/lxc-wait
/usr/lib/.build-id
/usr/lib/.build-id/17
/usr/lib/.build-id/17/6df415ed70683a3c2594aed7e873d246af41ff
/usr/lib/.build-id/2c
/usr/lib/.build-id/2c/d0abda6b955cd1e54acac78a7badc8888cd701
/usr/lib/.build-id/2e
/usr/lib/.build-id/2e/921569bbd4f0a8a19f4ce4bb4a0c8339604a89
/usr/lib/.build-id/38
/usr/lib/.build-id/38/642a8e7a3c9d82a1821d000128f2c883a14e57
/usr/lib/.build-id/40
/usr/lib/.build-id/40/5fc71472f00f9d9366e0ecbbfbdb3415b93616
/usr/lib/.build-id/4a
/usr/lib/.build-id/4a/44e315df2dbd6ec6d1b01e2acaaf12001101f3
/usr/lib/.build-id/71
/usr/lib/.build-id/71/c7d73a77fc97b491bd599b35bfdb29c4959b1d
/usr/lib/.build-id/78
/usr/lib/.build-id/78/cc98b71c3e884a9894477c5f2a73d6d75acb54
/usr/lib/.build-id/84
/usr/lib/.build-id/84/3d186377d63ef23c4808e0f62e673c8f3b4a1d
/usr/lib/.build-id/86
/usr/lib/.build-id/86/3f3a03e4990ea529002b2f9f167c20c0432120
/usr/lib/.build-id/95
/usr/lib/.build-id/95/47a70e430dfe61d64b4718a6b6b5b2ead84db4
/usr/lib/.build-id/9c
/usr/lib/.build-id/9c/eb3245090f7e3e3f869f37e13fc1811caf7afd
/usr/lib/.build-id/b5
/usr/lib/.build-id/b5/69ada31465ed567138e244b7855351df83797e
/usr/lib/.build-id/d5
/usr/lib/.build-id/d5/aaecd5698455d215b8d2f00d820dd09e973d4c
/usr/lib/.build-id/d6
/usr/lib/.build-id/d6/23d20433fc17cfafa3658a48822d5b52e6a962
/usr/lib/.build-id/e0
/usr/lib/.build-id/e0/9925182c64740f6af7ef61bf68f81f81e57949
/usr/lib/.build-id/e5
/usr/lib/.build-id/e5/5ea0da150db798ee591356e189d7ab158aac91
/usr/lib/.build-id/e8
/usr/lib/.build-id/e8/fb5d14812321091cdf8b41bd5b4ea17941e820
/usr/lib/.build-id/ef
/usr/lib/.build-id/ef/b37e537e93ff59070206f2d9649c86915b2275
/usr/lib/.build-id/f1
/usr/lib/.build-id/f1/b86c4eacf1e46b8409907052e4ffc086f71f05
/usr/lib/.build-id/fb
/usr/lib/.build-id/fb/8d7c19765fac609873368ed11274c4e9a60259
/usr/lib/.build-id/fe
/usr/lib/.build-id/fe/6bdf30794f90201cdc80908104492a00ece58e
/usr/lib/.build-id/ff
/usr/lib/.build-id/ff/3f1f560228dbf20af997fb37658565039522e9
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/lxc
/usr/share/lxc/lxc.functions
/usr/share/man/ja/man1/lxc-attach.1.gz
/usr/share/man/ja/man1/lxc-cgroup.1.gz
/usr/share/man/ja/man1/lxc-checkconfig.1.gz
/usr/share/man/ja/man1/lxc-checkpoint.1.gz
/usr/share/man/ja/man1/lxc-config.1.gz
/usr/share/man/ja/man1/lxc-console.1.gz
/usr/share/man/ja/man1/lxc-copy.1.gz
/usr/share/man/ja/man1/lxc-create.1.gz
/usr/share/man/ja/man1/lxc-destroy.1.gz
/usr/share/man/ja/man1/lxc-device.1.gz
/usr/share/man/ja/man1/lxc-execute.1.gz
/usr/share/man/ja/man1/lxc-freeze.1.gz
/usr/share/man/ja/man1/lxc-info.1.gz
/usr/share/man/ja/man1/lxc-ls.1.gz
/usr/share/man/ja/man1/lxc-monitor.1.gz
/usr/share/man/ja/man1/lxc-snapshot.1.gz
/usr/share/man/ja/man1/lxc-start.1.gz
/usr/share/man/ja/man1/lxc-stop.1.gz
/usr/share/man/ja/man1/lxc-top.1.gz
/usr/share/man/ja/man1/lxc-unfreeze.1.gz
/usr/share/man/ja/man1/lxc-unshare.1.gz
/usr/share/man/ja/man1/lxc-update-config.1.gz
/usr/share/man/ja/man1/lxc-usernsexec.1.gz
/usr/share/man/ja/man1/lxc-wait.1.gz
/usr/share/man/ko/man1/lxc-attach.1.gz
/usr/share/man/ko/man1/lxc-cgroup.1.gz
/usr/share/man/ko/man1/lxc-checkconfig.1.gz
/usr/share/man/ko/man1/lxc-checkpoint.1.gz
/usr/share/man/ko/man1/lxc-config.1.gz
/usr/share/man/ko/man1/lxc-console.1.gz
/usr/share/man/ko/man1/lxc-copy.1.gz
/usr/share/man/ko/man1/lxc-create.1.gz
/usr/share/man/ko/man1/lxc-destroy.1.gz
/usr/share/man/ko/man1/lxc-device.1.gz
/usr/share/man/ko/man1/lxc-execute.1.gz
/usr/share/man/ko/man1/lxc-freeze.1.gz
/usr/share/man/ko/man1/lxc-info.1.gz
/usr/share/man/ko/man1/lxc-ls.1.gz
/usr/share/man/ko/man1/lxc-monitor.1.gz
/usr/share/man/ko/man1/lxc-snapshot.1.gz
/usr/share/man/ko/man1/lxc-start.1.gz
/usr/share/man/ko/man1/lxc-stop.1.gz
/usr/share/man/ko/man1/lxc-top.1.gz
/usr/share/man/ko/man1/lxc-unfreeze.1.gz
/usr/share/man/ko/man1/lxc-unshare.1.gz
/usr/share/man/ko/man1/lxc-usernsexec.1.gz
/usr/share/man/ko/man1/lxc-wait.1.gz
/usr/share/man/man1/lxc-attach.1.gz
/usr/share/man/man1/lxc-cgroup.1.gz
/usr/share/man/man1/lxc-checkconfig.1.gz
/usr/share/man/man1/lxc-checkpoint.1.gz
/usr/share/man/man1/lxc-config.1.gz
/usr/share/man/man1/lxc-console.1.gz
/usr/share/man/man1/lxc-copy.1.gz
/usr/share/man/man1/lxc-create.1.gz
/usr/share/man/man1/lxc-destroy.1.gz
/usr/share/man/man1/lxc-device.1.gz
/usr/share/man/man1/lxc-execute.1.gz
/usr/share/man/man1/lxc-freeze.1.gz
/usr/share/man/man1/lxc-info.1.gz
/usr/share/man/man1/lxc-ls.1.gz
/usr/share/man/man1/lxc-monitor.1.gz
/usr/share/man/man1/lxc-snapshot.1.gz
/usr/share/man/man1/lxc-start.1.gz
/usr/share/man/man1/lxc-stop.1.gz
/usr/share/man/man1/lxc-top.1.gz
/usr/share/man/man1/lxc-unfreeze.1.gz
/usr/share/man/man1/lxc-unshare.1.gz
/usr/share/man/man1/lxc-update-config.1.gz
/usr/share/man/man1/lxc-usernsexec.1.gz
/usr/share/man/man1/lxc-wait.1.gz

References

Summary

In this tutorial we learn how to install lxc on Fedora 34 using yum and dnf.