podman-attach(1)

πŸ“¦
version 6.1.4 Β· 5 versions
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

✨ podman-attach β€” attach to a running container ✨

okay bestie, welcome to the podman-attach(1) page from the General Commands Manual πŸ’– this one's short and sweet and honestly? iconic.


🌸 NAME 🌸

podman-attach β€” attach to a running container


πŸ¦‹ SYNOPSIS πŸ¦‹

podman attach [options] container

podman container attach [options] container

πŸ’… DESCRIPTION πŸ’…

So podman attach does exactly what it says on the tin: it attaches you to a running container, either by its name or its ID, so you can either just vibe and watch its ongoing output, or take full control of it interactively. main character energy fr fr πŸ‘‘

And the way that you don't have to stay forever?? You can detach from the container (and leave it running, she's fine, she's thriving) using a configurable key sequence. The default sequence is ctrl-p,ctrl-q. You can configure that keys sequence with the --detach-keys OPTION, or you can set it in the containers.conf file β€” go peek at containers.conf(5) for more info 🫢


✨ OPTIONS ✨

  • --detach-keys=sequence β€” tells podman what key sequence detaches you from the container. The format is either a single character [a-Z], or one or more ctrl-<value> characters where <value> is one of: a-z, @, ^, [, , or _. If you specify "" it disables this feature entirely (no escape hatch, you're committed πŸ’€). The default is ctrl-p,ctrl-q.

This option can also be set in the containers.conf(5) file.

  • --latest, -l β€” instead of handing over a container name or ID, just use the last created container. Note: the last started container can be from other users of Podman on the host machine πŸ‘€. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines.)
  • --no-stdin β€” do not attach STDIN. The default is false.
  • --sig-proxy β€” proxy received signals to the container process. SIGCHLD, SIGURG, SIGSTOP, and SIGKILL are not proxied. The default is true.

🌈 EXAMPLES 🌈

Attach to a container called "foobar".

$ podman attach foobar

Attach to the latest created container. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

$ 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)


lowkey the whole page is just "attach, watch, maybe type, detach with ctrl-p,ctrl-q, slay" and honestly? that's the vibe check passed πŸ’–

and that's a wrap on the podman-attach(1) page from the General Commands Manual β€” go forth and attach responsibly bestie, ily, mwah πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from