In this tutorial, we will show you how to install Podman on Ubuntu 20.04 LTS. For those of you who didn’t know, Podman or Pod Manager is a very popular utility for managing containers and the storage volumes that are mounted onto those containers. All the containers and Pods are created as child processes of the Podman tool. The Podman’s CLI is based on the Docker CLI. Just like Docker, it helps developers to develop, manage, and run their applications on containers.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you through the step-by-step installation of Podman on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
Prerequisites
- A server running one of the following operating systems: Ubuntu 20.04, 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
- It’s recommended that you use a fresh OS install to prevent any potential issues
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Podman on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running the following apt
commands in the terminal.
sudo apt update sudo apt upgrade
Step 2. Installing Podman on Ubuntu 20.04.
- Install Podman from Ubuntu default repository.
The Podman package is available in the official repositories for Ubuntu 20.10 and is newer. Now run the following command to install it:
sudo apt install podman
- Install Podman from the official default repository.
Now you need to source the release version of your Ubuntu 20.04 system with the following command:
source /etc/os-release
Next, run the following command to create apt
source file:
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"
Then, add the apt-key using the following command:
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${VERSION_ID}/Release.key -O- | sudo apt-key add -
After adding the APT key, you need to update your system again with the following command:
sudo apt update
Finally, use the following command to install Podman on the Ubuntu system:
sudo apt install podman
Once successfully installed, run the following command to check the Podman version:
podman --version
Step 3. How to use Podman.
You can search for the Podman images in the registries you have specified as:
podman search ubuntu-20.04
To list the downloaded Podman images, run the following command:
sudo podman images
To pull Podman images you can run the command sudo podman pull (image-name)
. In this example, I have pulled the latest version of the Ubuntu image as:
podman pull ubuntu
Congratulations! You have successfully installed Podman. Thanks for using this tutorial for installing Podman on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official Podman website.