How to Install Podman on Ubuntu 20.04

Install Podman on Ubuntu 20.04

In this article, we will have explained the necessary steps to install and configure Podman on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Podman is a daemon-less container engine for developing, managing, and running OCI Containers on your Linux System. Podman and Docker are similar software packages. However, the key difference is that Podman doesn’t require a daemon to run containers, while Docker needs the Docker Engine daemon. Because of this, Podman requires run completely to start containers while it is inherent to the Docker Engine daemon. Podman also uses Skopeo (container porting) and Buildah (container building) libraries to implement some functionality, but the daemon service is not used.

Install Podman on Ubuntu 20.04

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

sudo apt update
sudo apt upgrade

Step 2. Install Podman on the Ubuntu system.

The Podman package is available in the official repositories for Ubuntu, now install Podman using the following command below:

sudo apt install podman

Finally, you can verify Podman installation on your Ubuntu 20.04 by checking its version with the command shown below:

root@linuxtips.us:~# podman --version
podman version 3.1.0

You can also use the Podman command podman info to see configuration information and the versions of various components:

root@linuxtops.us:~# podman info
host:
  arch: amd64
  buildahVersion: 1.30.0
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.46, commit: '
  cpus: 6
  distribution:
    distribution: ubuntu
    version: "20.04"
  eventLogger: journald
  hostname: host
...
...
version:
  APIVersion: 3.2.0
  Built: 0
  BuiltTime: Thu Jan  1 00:01:10 2020
  GitCommit: ""
  GoVersion: go1.16.2
  OsArch: linux/amd64
  Version: 3.2.0

Step 3. Using Podman Commands.

The below table shows the most commonly used commands in Podman:

CommandDescription
podman –helpRetrieve Podman help information.
man podmanRetrieve detailed Podman information.
podman search someimageFind images (as with most Unix programs). Input the image name.
podman pull someregistry.org/someimageDownload an image. Input the name of the registry and image.
podman someimagesSee podman search someimage. Use the full name of an image (e.g., someregistry.org/someimages/version1.0.1) as they are stored in a different registry.
podman run -dt -p 8080: 80 / tcp someregistry.org/someimagesStart the container.
podman psView the list of running containers.
podman ps -aBView the list of all containers (created, completed, and launched).
podman inspect -l | grep ipaddressView the running container.
A container can work in non-root mode, so it is not assigned an IP address.
podman logs -lView container logs.
podman top -lView pid containers.
podman stop -lStop a container.
podman rm -lRemove a container.

That’s all you need to do to install Podman on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. For further reading on Install Podman, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.