How to Install and Use Podman on Ubuntu

Wondering how to install and use Podman on Ubuntu 20.04 LTS?

Podman is a tool that’s designed for managing pods. It manages Containers of different types, mostly OCI. Podman can also be used to create and develop Containers on your Linux distribution.

Podman distinguishes itself from its competitors by allowing you to run Containers in both root and rootless mode. Additionally, Podman isn’t a running service, meaning that it’s daemonless.

With tempting features like this, Podman may be the solution to all your OCI-based Container problems. This guide is meant to help you learn how to install and use Podman on Ubuntu 20.04 LTS.

We will cover methods to install the service on your system and a basic tutorial on how to use Podman.

So with that said, let’s take a look at the steps!

Prerequisites of Podman.

Before you can learn how to install and use Podman on Ubuntu 20.04 LTS, it is necessary to learn whether you meet the prerequisites to ensure a seamless installation.

First and foremost, it’s preferred that you use Ubuntu 20.04 LTS or higher. Although this is recommended, you shouldn’t face any difficulties using this guide for Ubuntu version 18.04 or higher.

You will also need a Ubuntu server for this tutorial. There are many options available online, so you should decide which option caters to your needs.

Additionally, as is the requirement with any installation guide, make sure that you have an account with sudo or root privileges and a working internet connection to ensure package installation without delays.

With this, you are ready to move on to the process of installation.

Install Podman Using the Terminal.

In this step, you’ll learn how to install Podman. This step will make use of the Command Terminal. 

While this may seem daunting to beginners, no need to worry. We’ll guide you through each command step by step.

Follow these steps to install Podman on your system:

  1. Start by opening the Command Terminal. You can achieve this by pressing Ctrl + Alt + T on your keyboard. 
  2. Next, type the following command:
$ sudo apt update
Podman on Ubuntu

This should update your packages and repositories to the latest available version.

  1. Once that’s done, log into the server you’ve created and type the following in the Terminal:
$ source /etc/os-release
$ sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"

This should create the required apt files.

Podman on Ubuntu
  1. Afterward, proceed to add the required apt key by typing the following:
$ wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add -
Podman on Ubuntu
  1. Update your packages once again using the apt update command as shown below.
$ sudo apt update -qq
update
  1. Lastly, install Podman by typing the following:
$ sudo apt-get -qq install podman
install command

With the steps followed correctly, you should now have Podman on your system. In case you have Ubuntu version 20.10 or higher, the installation process is rather simple. Follow these steps to install Podman on Ubuntu 20.10 or higher:

  1. First, open the Command Terminal by pressing Ctrl + Alt + T on your keyboard.
  2. Next, type the following command:
$ sudo apt update
update
  1. Lastly, type the following command to install Podman:
$ sudo apt install podman

To verify whether Podman has been installed on your system, run this command in the Terminal:

$ sudo podman --version

If your output is similar to that in the image below, Podman has been correctly installed. All that’s left is to learn how to use it.

Getting Started With Podman.

With Podman installed, you can proceed to learn how to get started with it. This section of the guide will serve as a starter guide for Podman.

By the end of this section, you should be able to navigate through the different sections of Podman on your own.

First and foremost, you should start by adding new registries in the OCI repository file. You can do this by editing the content of the OCI registry. To achieve this, type this command in the Terminal:

$ sudo nano /etc/containers/registries.conf
Podman on Ubuntu

Here you can add registries as per need. Additionally, editing the configuration file contents will allow you to manage your containers at will.

Next, we will demonstrate how you can use Podman with images.

Podman can be used to pull images from the list of registries. You can make use of the podman pull command to achieve this task. Simply open the Command Terminal and type the following:

$sudo podman pull <docker image name>

In our case,

$sudo podman pull ubuntu
Podman on Ubuntu

You can access the details of the registry by typing the following in the Terminal:

$sudo podman images
details

Additionally, you can view the running containers by using this command:

$ sudo podman ps -a
Podman on Ubuntu

If you wish to learn about these commands in more detail, check out the official Podman.io webpage.

Uninstalling Podman.

If you’re finished using Podman or want to switch to another container manager, it is recommended that you uninstall Podman from your system to save resources.

The process of uninstallation is easy and makes use of the Command Terminal.

Follow these steps to uninstall Podman from your system:

  1. First, open the Command Terminal by pressing Ctrl + Alt + T on your keyboard.
  2. Once the Terminal opens, type the following to uninstall Podman:

$ sudo apt remove podman

remove command

This should remove Podman from your system. If you wish to delete all content and packages related to Podman, use this command:

$ sudo apt purge podman

While on the topic of servers, it is necessary to have a tool that can test your website before it goes live. Fortunately, XAMPP gets the job done. XAMPP allows you to host your website on a local network, allowing you to debug your designs without worrying about whether the website is available to others.

We hope this guide helped you learn how to install and use Podman on Ubuntu. If you have any questions or suggestions to improve our guides, let us know in the comment section below.

If this guide helped you, please share it. 🙂

Leave a Reply

Your email address will not be published.

Previous Post

How to Fix Errors While Exporting Videos on PowerPoint

Next Post
Preparing Automatic Repair Loop on Windows 11

How to Fix Preparing Automatic Repair Loop on Windows 11

Related Posts