Stop containers

Use the podman stop command to stop a running container. You can specify the containers by their container ID or name.

Before you begin

  • The container-tools meta-package is installed.
  • At least one container is running.

Procedure

Stop the myubi container:
  • By using the container name:
    $ podman stop myubi
  • By using the container ID:
    $ podman stop 1984555a2c27

    To stop a running container that is attached to a command-line session, you can enter the exit command inside the container.

    The podman stop command sends a SIGTERM signal to stop 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 kill command to kill a container (SIGKILL) or send a different signal to a container. The following example command sends a SIGHUP signal to a container. If supported by the application, the signal causes the application to re-read its configuration files:

    # podman kill --signal="SIGHUP" 74b1da000a11
    74b1da000a114015886c557deec8bed9dfb80c888097aa83f30ca4074ff55fb2

    For more information, see the podman-stop(1) and podman-kill(1) man pages on your system.