5.14. Stopping containers
Use the podman stop command to stop a running container. You can specify the containers by their container ID or name.
Prerequisites
-
The
container-toolsmeta-package is installed. - At least one container is running.
Procedure
Stop the
myubicontainer:By using the container name:
$ podman stop myubiBy using the container ID:
$ podman stop 1984555a2c27To stop a running container that is attached to a terminal session, you can enter the
exitcommand inside the container.The
podman stopcommand sends a SIGTERM signal to terminate a running container. If the container does not stop after a defined period (10 seconds by default), Podman sends a SIGKILL signal.You can also use the
podman killcommand to kill a container (SIGKILL) or send a different signal to a container. Here is an example of sending a SIGHUP signal to a container (if supported by the application, a SIGHUP causes the application to re-read its configuration files):# podman kill --signal="SIGHUP" 74b1da000a11 74b1da000a114015886c557deec8bed9dfb80c888097aa83f30ca4074ff55fb2For more information, see the
podman-stop(1)andpodman-kill(1)man pages on your system.