podman-attach - Man Page

Attach to a running container


podman attach [options] container

podman container attach [options] container


podman attach attaches to a running container using the container's name or ID, to either view its ongoing output or to control it interactively.
The container can detached from (and leave it running) using a configurable key sequence. The default sequence is ctrl-p,ctrl-q. Configure the keys sequence using the --detach-keys option, or specifying it in the containers.conf file: see containers.conf(5) for more information.



Specify the key sequence for detaching a container. Format is a single character [a-Z] or one or more ctrl-<value> characters where <value> is one of: a-z, @, ^, [, , or _. Specifying "" will disable this feature. The default is ctrl-p,ctrl-q.

--latest, -l

Instead of providing the container name or ID, use the last created container. If you use methods other than Podman to run containers such as CRI-O, the last started container could be from either of those methods. The default is false.
IMPORTANT: This option is not available with the remote Podman client


Do not attach STDIN. The default is false.


Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is true.


Attach to a container called "foobar".

$ podman attach foobar

Attach to the latest created container.

$ podman attach --latest

Attach to a container that start with the ID "1234".

$ podman attach 1234

Attach to a container without attaching STDIN.

$ podman attach --no-stdin foobar

See Also

podman(1), podman-exec(1), podman-run(1), containers.conf(5)

Referenced By

podman(1), podman-container(1), podman-create(1), podman-remote(1), podman-run(1).

The man page podman-container-attach(1) is an alias of podman-attach(1).