Home Computer Tutorials Computer Knowledge How to install Podman on Ubuntu 24.04

How to install Podman on Ubuntu 24.04

Mar 22, 2024 am 11:26 AM
Install ubuntu podman System Upgrade

如何在Ubuntu 24.04上安装Podman

If 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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed method to update system version in vivo mobile phone Detailed method to update system version in vivo mobile phone Apr 19, 2024 pm 02:49 PM

1. Open the desktop of your vivo phone, find [Settings], and click to open it. 2. Click to enter [System Upgrade]. 3. After the phone checks for updates, click [Install Now] to install and upgrade the new system.

What to do if your Huawei phone has insufficient memory (Practical methods to solve the problem of insufficient memory) What to do if your Huawei phone has insufficient memory (Practical methods to solve the problem of insufficient memory) Apr 29, 2024 pm 06:34 PM

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

Tutorial on how to solve the problem of being unable to access the Internet after upgrading win10 system Tutorial on how to solve the problem of being unable to access the Internet after upgrading win10 system Mar 27, 2024 pm 02:26 PM

1. Use the win+x shortcut key to open the menu and select [Command Prompt (Administrator) (A)], as shown below: 2. After entering the command prompt interface, enter the [ipconfig/flushdns] command and press Enter , as shown in the figure below: 3. Then enter the [netshwinsockresetcatalog] command and press Enter, as shown in the figure below: 4. Finally enter the [netshintipreset] command and press Enter, restart the computer and you can access the Internet, as shown in the figure below:

What should I do if League of Legends does not support DX9? How to upgrade to DX11 when playing League of Legends on PC What should I do if League of Legends does not support DX9? How to upgrade to DX11 when playing League of Legends on PC May 06, 2024 pm 12:07 PM

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

Android TV Box gets unofficial Ubuntu 24.04 upgrade Android TV Box gets unofficial Ubuntu 24.04 upgrade Sep 05, 2024 am 06:33 AM

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

Mobile phone screen becomes blurry Mobile phone screen becomes blurry Mar 25, 2024 pm 09:31 PM

Why does the mobile phone screen always become tweedy? 1. It displays horizontal or vertical bars, which is usually caused by the disconnection of the LCD screen cable. This is generally difficult to repair, unless it is a professional technician who produces LCD screens. If the screen shows cloud-like spots, the screen is definitely broken and cannot be repaired or replaced with a new one. 2. Cause of failure: The mobile phone screen is faulty and the LCD screen is damaged. It is recommended to replace the screen. If the mobile phone cable is loose and faulty, it is recommended to replace the cable. Maintenance method: Turn off the mobile phone, remove the battery, reinstall the battery later, and restart the phone. , try it and see if it solves the problem. 3. First of all, there is a possibility that the cable is broken. Most mobile phone screens are made of LCD. If the LCD cable is broken, it will cause the LCD screen to become distorted. This is also more difficult to repair. The second is that the LCD screen itself is broken, such as the table

Acer laptop keyboard malfunctioning Acer laptop keyboard malfunctioning Mar 25, 2024 pm 10:46 PM

Acer laptop keyboard failure may be a driver problem. Right-click My Computer, click the Manage option, find Device Manager, find the keyboard device, expand the options, and see if there is a driver problem. If it is a driver problem, just uninstall and install it again. Function keys such as uppercase and lowercase letters and numeric keypad keys are malfunctioning. If the input display is inconsistent due to the malfunction of the uppercase and lowercase letters of the Acer desktop computer keyboard or the malfunction of the numeric keys, you can check whether the function keys such as the CapsLock key and the Shift key on the left side of the keyboard and the NumLock key on the right side switch normally. Reasons why Acer laptop keyboard fails: The built-in keyboard may be blocked by many office workers. For convenience of use, they often place the computer in a fixed position, or to extend the service life of the computer keyboard.

How to enable Douyin Do Not Disturb setting How to enable Douyin Do Not Disturb setting May 04, 2024 pm 04:18 PM

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.

See all articles