Monday, March 2, 2026

Running linux container using incus

Incus is a manager for system container, application container and virtual machine. It provides a user experience similar to public cloud, and gives the ability for user to manage containers and virtual machines in one platform.

This post will show you how to install incus, and run a system container using incus.

To install incus in an ubuntu machine, just run this command:
$ sudo apt update && sudo apt install incus -y

Once installed, add your current user to the incus and incus-admin group to enable controlling incus without using sudo
$ sudo usermod -G incus -a $(whoami)
$ sudo usermod -G incus-admin -a $(whoami)

Log into incus-admin group to start using incus command (once you log out and log in back again, you do not need to do this) 
$ newgrp incus-admin

Initialize incus,with minimal setting
$ incus admin init --minimal

You can now list ubuntu images from the incus repository
$ incus image list images:ubuntu

Then run your first incus container based on ubuntu 26.04, named myfirstcontainer
$ incus launch images:ubuntu/26.04 myfirstcontainer

You can now list out the containers that you have launched
$ incus ls

No comments: