github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-attach.1.md (about) 1 % podman-attach(1) 2 3 ## NAME 4 podman\-attach - Attach to a running container 5 6 ## SYNOPSIS 7 **podman attach** [*options*] *container* 8 9 **podman container attach** [*options*] *container* 10 11 ## DESCRIPTION 12 **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.\ 13 The *container* can be 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)](https://github.com/containers/common/blob/master/docs/containers.conf.5.md)** for more information. 14 15 ## OPTIONS 16 #### **--detach-keys**=**sequence** 17 18 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.\ 19 The default is `ctrl-p,ctrl-q`. 20 21 #### **--latest**, **-l** 22 23 Instead of providing the *container ID* or *name*, use the last created *container*. If other methods than Podman are used to run *containers* such as `CRI-O`, the last started *container* could be from either of those methods.\ 24 The default is **false**.\ 25 *IMPORTANT: This OPTION is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. This OPTION does not need a container name or ID as input argument.* 26 27 #### **--no-stdin** 28 29 Do not attach STDIN. The default is **false**. 30 31 #### **--sig-proxy** 32 33 Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied.\ 34 The default is **true**. 35 36 ## EXAMPLES 37 Attach to a container called "foobar". 38 ``` 39 $ podman attach foobar 40 ``` 41 42 Attach to the latest created container. 43 ``` 44 $ podman attach --latest 45 ``` 46 47 Attach to a container that start with the ID "1234". 48 ``` 49 $ podman attach 1234 50 ``` 51 52 Attach to a container without attaching STDIN. 53 ``` 54 $ podman attach --no-stdin foobar 55 ``` 56 57 ## SEE ALSO 58 **[podman(1)](podman.1.md)**, **[podman-exec(1)](podman-exec.1.md)**, **[podman-run(1)](podman-run.1.md)**, **[containers.conf(5)](https://github.com/containers/common/blob/master/docs/containers.conf.5.md)**