LXD Ubuntu- How to Install on Linux Ubuntu 18.04 LTS, 19.04 & More

Install LXD System Container Manager on Linux Ubuntu, Arch, Fedora, CentOS, and OpenSUSE

LXD Ubuntu


XD Ubuntu: LXD Allows you to run a number of Containers on various Linux Distros. Compared to Virtual Machines, LXD is light and more secure than the VMs. LXD lets you do to a number of processes such as running Linux Distros and manage Resource limits, setting up storage and network and more. Simply, LXD is a Futuristic system container manager. In this article, we will see how to install LXD on various Linux Distros such as Linux Ubuntu 18.04 LTS, Ubuntu 19.04, Fedora, Arch, CentOS, OpenSUSE and more.

Jump to:

How to Install LXD on Linux Ubuntu 18.04 LTS, 19.04 & other Ubuntu-based Distros- Using Terminal:

Note: Snap is pre-installed on Linux Ubuntu 16.04 and Higher versions. However, it can be installed using the command sudo apt install snapd.
  • Open Terminal on Ubuntu using CTRL + ALT + T.
  • Execute the following command on the terminal. Kindly refer to the following image.
    $sudo snap install lxd
  • You will be asked to enter the system password to authenticate the installation process.

Install LXD Ubuntu on Linux Ubuntu 18.04 LTS/ 19.04- Using Ubuntu Software:

  • Go to All Applications(Show Applications on Disco Dingo).
  • Locate Ubuntu Software and open it.
    LXD Ubuntu
    LXD Ubuntu
  • Click on the Search symbol available on the Ubuntu Software.
    LXD Ubuntu
    LXD Ubuntu
  • A search bar will dropdown. Search for LXD.
    Search for LXD
    Search for LXD
  • Once found, click on that and Choose Install.
    Choose Install
    Choose Install
  • Kindly wait till the installation completes.

Remove LXD system Container from Linux Ubuntu:

The following is the command to be used to remove LXD from Linux Ubuntu and Ubuntu-based Distros.

$sudo snap remove lxd

Getting Started with LXD on Linux Ubuntu 18.04.3 LTS:

Once installed then we can start using the LXD system Container Manager on Linux Ubuntu.

Commands related to LXD:

Note: All the commands on LXD should be executed as root. Hence don’t forget to add sudo with them

Initialization of LXD on your Ubuntu Terminal:

$sudo lsc init
LXD Initialisation
LXD Initialisation

Once you execute the above command, then it will ask your system password to authenticate the process. The LXD Initialisation command will configure the following data.

  • LXD Clustering.
  • New Storage Pool.
  • ZFS Pool.
  • New Loop device size.
  • MAAS Server.
  • New Local Network Bridge.
  • IPv4 and IPv6 and more.

You can find them created after your configuration.

LXD Initialisation
LXD Initialisation

Creating the first LXD Container:

$sudo lxc launch ubuntu:18.04 first
Creating the first LXD Container
Creating the first LXD Container
  • The above command will create your first system container containing Ubuntu 18.04 as specified.
    creating the container
    Creating the container
  • Kindly give it some time for the download to complete.

To list the containers available on LXD:

$sudo lxc list

Get Shell on your Container:

Once the container is created, then you can get shell in that container using the following container.

$lxc exec first -- /bin/bash

Run a Command directly on the container:

To run a command on the container then the following is the example to do so.

$lxc exec first -- apt-get update

Install LXD on Linux Fedora, Arch, OpenSUSE, and CentOS:

In this section, we will see how to install LXD on various Linux distros such as Fedora, Arch, CentOS, and OpenSUSE.

Install LXD for Linux Fedora:

$sudo dnf install snapd
$sudo ln -s /var/lib/snapd/snap /snap
$sudo snap install lxd

Install LXD on Arch Linux:

$git clone
cd snapd
makepkg -si
$sudo systemctl enable --now snapd.socket
$sudo ln -s /var/lib/snapd/snap /snap
$sudo snap install lxd

Install LXD for CentOS:

$sudo yum install epel-release
$sudo yum install snapd
$sudo systemctl enable --now snapd.socket
$sudo ln -s /var/lib/snapd/snap /snap
$sudo snap install lxd

Install LXD for OpenSUSE:

$sudo zypper addrepo --refresh snappy
$sudo zypper --gpg-auto-import-keys refresh
$sudo zypper dup --from snappy
$sudo zypper install snapd
$sudo systemctl enable snapd
sudo systemctl start snapd
$sudo systemctl enable snapd.apparmor
sudo systemctl start snapd.apparmor
$sudo snap install lxd

Get in Touch with Us:

This article provides detailed information on LXD System container manager and also about installing LXD on Linux Ubuntu 18.04 LTS, 19.04 Disco Dingo, Fedora, Arch, OpenSUSE, CentOS and more. If you have any Query with the above article, Kindly Comment Us and we will revert to you with a solution ASAP.

  • Article Quality
  • Content Depth
  • Explanation
  • Efficiency of the Article
  • Author Rating


For more interesting articles, Kindly visit our Home Page

Check this too  How to Install Opera Browser on Ubuntu 18.04 LTS & 19.04 Disco Dingo

Leave a Reply

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

Written by Mike

Seeker of nature. For me, everything is about nature. Loves to gaze through different scapes, weather and admire the colors of nature. Contact me through the Contact Us adding "@Mike" on the Subject box.

Ruby Ubuntu- How To Install Ruby on Ubuntu 18.04 LTS & 19.04

Change User Password in Linux

How to Change User Password in Ubuntu 18.04 LTS & 19.04 Disco Dingo