How to Install, Create and Manage LXC (Linux Containers) in RHEL/CentOS 7

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

20 Responses

  1. Robert M. Koretsky says:

    Actually, I checked, and I did have to install lxc-extra in order to get everything shown in this tutorial to work!

  2. Robert M. Koretsky says:

    I cannot address Ales’s comment. But the dependencies between Linux software is highly complex, if they are easy for you to untangle, the more power to you. As far as Alberto’s comment goes, I might have installed lxc-extra but I don’t recall.

    Certainly it couldn’t hurt to do so. Maybe some day in the near future for CentOS, lxd will be as easy to install as lxc is, as shown in this article. As I say in mt previous comment, on Debian family, lxd is a very simple installation, and useful too in order to sandbox machines.

  3. Ales Drtik says:

    For what is libvirt installed when you use lxc-* commands only?

  4. Alberto Fernandez says:

    Hi Matei Cezar,

    Your Information was Great, so thanks for sharing it with us; but I have some issues on Red Hat 7.4 distribution with the lxc-ls command, when I try to perform the command it display: command not found… it seems the distribution that I use need to install a extra package to solve this; so it will be helpful that you can recommend to users to add the package: sudo yum install -y lxc-extra since this use python3.


  5. Robert M. Koretsky says:

    Excellent article! Much thanks! At this time, 12/5/2017, installation of lxd on CentOS 7.4 is not reliably achievable by an ordinary Linux user. But lxc is, exactly as shown so well here by Mr. Cezar.

    Personally, I’m not too sure what lxd gets you anyway, above and beyond lxc. I have lxd installed on Linux Mint 18.2, and there is a pretty easy path to installation on Debian-family systems. Not so on the RHEL-family.

    I cannot speak towards installing either lxc/lxd on the Slackware/OpenSuse family.

Leave a Reply to Robert M. Koretsky Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.