How to install Podman on Ubuntu 24.04
Mar 22, 2024 am 11:26 AMIf you have used Docker, you must understand daemons, containers, and their functions. A daemon is a service that runs in the background when a container is already in use in any system. Podman is a free management tool for managing and creating containers without relying on any daemon such as Docker. Therefore, it has advantages in managing containers without the need for long-term backend services. Additionally, Podman does not require root-level permissions to be used. This guide discusses in detail how to install Podman on Ubuntu 24.
Update system
We first need to update the system and open the Terminal shell of Ubuntu 24. During both installation and upgrade processes, we need to use the command line. A simple way is to use Ubuntu's "apt" utility and prepend the "update" command with sudo permissions. This command updates system utilities and repositories to ensure that potential conflicts do not occur when new software and applications are installed. You can also perform system upgrades and updates if needed.
sudo apt update
Install Podman
After upgrading to Ubuntu 24 system, we can continue to install Podman. Installation using the "apt" tool is very convenient and is easy to find in the installation instructions. In order to force the installation of Podman, we can use the "-y" flag. So just run the following command to start the installation:
sudo apt install—y podman
Installing the Podman tool may take longer than a regular installation, so you will need to wait patiently until the installation is complete.
After waiting for some time, Podman will be installed and its symbolic links will be created, as shown in the output:
Verify installation
In order to confirm that the Podman tool is successfully installed and configured in the Ubuntu 24 system, we can use a simple version command to find the installed version of Podman.
Sudabodman-Version
To get information about the Podman tool installed in your terminal, you can also use the "info" command with sudo privileges as follows:
Sudo Podman info
Run containers through Podman
We can say that a container is a service that uses different images for processing. You can create containers or use ones already built in. So we have to pull the container out and run it on our end. To do this, we use the "Run" directive, the "-it" flag and the container name, i.e., hello world it will start pulling the container from its primary source and run it on our end.
Sudo Podman Run—it Hello—World
After executing this "Run" instruction, you will get the following output. You can see that this container is pulled from Docker's main source:
Now we can find all containers currently running on Ubuntu24. To do this, we use the Podman command with the "ps" option shown below. The output of this command shows that there are currently no working containers. We can use the "-a" flag in the same directive while finding all pulled containers. You can see that the output with the "-a" option shows information for one container.
- Several Boardman PS
- Sudo Boardman PS—A
Remove container
Just like adding a new container to the system, you can also use the Podman tool to remove any added container from the Ubuntu 24 system. You must use the "rm" option in the Podman command along with sudo permissions. Make sure to mention the container ID after the "rm" option in the same query. Containers with specific IDs will be permanently removed.
Sudo Podman rm 9bd8d19ef028
Using images via Podman
An image in a Podman environment is known as the set of instructions required to run a container service or application. Therefore, to run Podman containers we need a specific image. To list all available images on Ubuntu 24, you need to use the same Podman command, using the "images" keyword. It will display all the images available in the system, i.e. d2c94e258dcb.
Sudo Boardman Pictures
To get a new image for your Podman environment, you can run the "Pull" command with the name of the new image, i.e. "Debain", as shown in the attached image.
Sudo podman pull Debian
After using the image description again, you can see that the new image has been downloaded successfully.
Sudo Boardman Pictures
Create a container in Podman
Now that the image has been downloaded, we must run it to create a container with a user-defined name. To do this, Podman's "run" command will be executed with the "-dit" and "-name" flags, followed by the name of the container, i.e. "Debian-container", and the name of the image you just downloaded, i.e. "Debian" . You can also see it working in Podman after creating a container from a "Debian" image.
- Sudo Podman run—dit—name debian—container debian
- Several Boardman PS
To connect to a newly running container named "debian-container", you need to use Podman's "attach" command. You can work in this container.
Sudo Podman Attach Debian—Container
To get the version of a container, run the following command in this container:
Cat/etc/os—release
Now, to exit a container and prevent it from running, you must use the "exit" command, followed by the Podman "Stop" command, using the name of the specific container.
- exit
- sudo podman stop debian container
To start, stop and delete the Podman container, you can use the following commands in sequence:
- Sudo podman starts Debian-container
- sudo podman stop debian container
- Sudo Podman rm debian—container
You can remove the Podman image using the "RMI" option in the same "Remove" command.
sudo podman rmi debian
Boardman
Now it’s time to uninstall the Podman tool from your Ubuntu system using the “Remove” command. Using the "apt" utility is a must since we installed it with "apt".
Sudo apt remove Podman
in conclusion
This guide describes how to use containers and images through the Podman tool. We elaborate on the main differences between Podman and Docker services. After that, we detailed the easiest way to install Podman in Ubuntu 24 and pulled some containers and images. After that, we learned how to use containers using images and the steps to uninstall the Podman service.
The above is the detailed content of How to install Podman on Ubuntu 24.04. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Insufficient memory on Huawei mobile phones has become a common problem faced by many users, with the increase in mobile applications and media files. To help users make full use of the storage space of their mobile phones, this article will introduce some practical methods to solve the problem of insufficient memory on Huawei mobile phones. 1. Clean cache: history records and invalid data to free up memory space and clear temporary files generated by applications. Find "Storage" in the settings of your Huawei phone, click "Clear Cache" and select the "Clear Cache" button to delete the application's cache files. 2. Uninstall infrequently used applications: To free up memory space, delete some infrequently used applications. Drag it to the top of the phone screen, long press the "Uninstall" icon of the application you want to delete, and then click the confirmation button to complete the uninstallation. 3.Mobile application to

Recently, "League of Legends" ushered in the 14.9 version update. After the update, "League of Legends" no longer supports DirectX9 in all regions around the world. In other words, if the user's computer graphics card can only support DirectX9, then the graphics card or device must be replaced. If there is no problem with the graphics card, you can update the driver. You can also update and upgrade the system, and the DirectX version will also be updated accordingly. It is understood that DirectX is a series of application development interfaces (APIs for short) developed by Microsoft. This API allows various applications to interact with your computer's hardware (including but not limited to mouse, keyboard, graphics card, etc.). Many applications use DirectX, but Direct

For many users, hacking an Android TV box sounds daunting. However, developer Murray R. Van Luyn faced the challenge of looking for suitable alternatives to the Raspberry Pi during the Broadcom chip shortage. His collaborative efforts with the Armbia

With the continuous development of technology, Microsoft is also continuing to update and optimize the Windows operating system to provide users with a better experience. By upgrading from Windows 7 to Windows 10, you can not only enjoy more new features and performance improvements, but also get longer-term technical support. This article will introduce in detail the steps to upgrade from Windows 7 to Windows 10, as well as the things you need to pay attention to during the upgrade process, to help you successfully complete the system upgrade. Tool raw materials: System version: Windows7 (any version), Windows10 (latest version) Brand model: Any brand and model of personal computer, such as Lenovo, Dell, HP, etc. Software version: Windows10 officially provided by Microsoft

Have you ever encountered a similar situation? After entering Apple recovery mode on your iPhone, you find that it cannot exit. What is the reason? Common reasons for iPhone to be in recovery mode are as follows: 1. Software problem: An abnormality occurs in the operating system or application, causing the device to be stuck in recovery mode; 2. System upgrade failure: When updating the iOS system, if an error occurs or the update is interrupted , may cause the phone to enter recovery mode; 3. Misoperation problem: The user may press or press by mistake, which triggers the device to enter recovery mode. How do you exit recovery mode on your Apple phone? Don’t worry, the editor has summarized several methods for exiting recovery mode, let’s take a look! Method 1: Force restart if you entered due to misoperation or accident

People are very concerned about the mobile phone models supported by this system, with the release of Huawei Hongmeng system. This article will introduce in detail the mobile phone models supported by Huawei Hongmeng system as well as their features and advantages. 1: Huawei Mate series - the powerful flagship model is naturally one of the first mobile phones to support Hongmeng system. The Huawei Mate series is Huawei's flagship model. For models such as Mate30 or Mate20, you can experience the new functions and optimizations brought by Hongmeng system through system upgrades, whether it is Mate40. 2: Huawei P series - powerful imaging mobile phone Huawei P series has always been sought after by the majority of users for its excellent camera capabilities. Users can enjoy a smoother and smoother operating experience during the photo taking process. The good news is that Huawei P series

Steps to enable Douyin Do Not Disturb settings: Enter the settings page; find notification settings; turn off non-important notifications; turn off system notifications; save settings. After turning it on, notifications such as likes, comments, and system upgrade reminders will be muted or turned off, except for group chat messages.

What causes mobile phone screen flickering? 1. Screen quality problems Screen quality problems are one of the main reasons for mobile phone screen flickering. If you buy a low-priced or lower-quality phone, the screen quality may not be great and flickering may occur. Operating System Issues Operating system issues may cause your phone screen to flicker. 2. Reasons for mobile phone screen flickering: screen damage, battery damage, software problems. The screen is damaged. If your phone's screen is cracked or otherwise damaged, the screen may flicker. Additionally, the screen may flicker because of a poor screen connection or a problem with the screen's hardware components. 3. It may be due to the following three reasons: The battery power supply is insufficient. It is best to replace the battery and try to use it. There is something wrong with the screen. System problem, it is best to refresh the machine and restart
