Files
podman/docs/source/markdown/podman-attach.1.md.in
Ed Santiago 617a2de3a4 Man pages: Refactor common options: --detach-keys
Refactored among all files that mentioned it.

DANGER WILL ROBINSON! REVIEW CAREFULLY! Here are two major
decisions I made:

  1) Look at the text for podman-run, in particular the "" text.
     It currently says "will use the default". As best I can
     tell this is not true, so I changed it to "will disable"
     which matches all the other commands.

  2) The "containers.conf" text, I decided, applies to all
     commands, not just podman-run (it was only present in
     podman-run). If this is not the case, please yell.

Other changes are cosmetic formatting stuff, asterisks end newlines.
Hard to review with hack/markdown-preprocess-review, because all
the text is one horrible long line instead of 80-char breaks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-13 10:42:50 -06:00

55 lines
1.9 KiB
Markdown

% podman-attach 1
## NAME
podman\-attach - Attach to a running container
## SYNOPSIS
**podman attach** [*options*] *container*
**podman container attach** [*options*] *container*
## DESCRIPTION
**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 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.
## OPTIONS
@@option detach-keys
#### **--latest**, **-l**
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.\
The default is **false**.\
*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.*
#### **--no-stdin**
Do not attach STDIN. The default is **false**.
@@option sig-proxy
The default is **true**.
## EXAMPLES
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.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)**