.nh .TH podman-attach 1 .SH NAME .PP podman-attach - Attach to a running container .SH SYNOPSIS .PP \fBpodman attach\fP [\fIoptions\fP] \fIcontainer\fP .PP \fBpodman container attach\fP [\fIoptions\fP] \fIcontainer\fP .SH DESCRIPTION .PP \fBpodman attach\fP attaches to a running \fIcontainer\fP using the \fIcontainer's name\fP or \fIID\fP, to either view its ongoing output or to control it interactively. .br The \fIcontainer\fP can be detached from (and leave it running) using a configurable key sequence. The default sequence is \fB\fCctrl-p,ctrl-q\fR\&. Configure the keys sequence using the \fB--detach-keys\fP OPTION, or specifying it in the \fB\fCcontainers.conf\fR file: see \fBcontainers.conf(5)\fP for more information. .SH OPTIONS .SS \fB--detach-keys\fP=\fIsequence\fP .PP Specify the key sequence for detaching a container. Format is a single character \fB\fC[a-Z]\fR or one or more \fB\fCctrl-\fR characters where \fB\fC\fR is one of: \fB\fCa-z\fR, \fB\fC@\fR, \fB\fC^\fR, \fB\fC[\fR, \fB\fC,\fR or \fB\fC_\fR\&. Specifying "" will disable this feature. The default is \fIctrl-p,ctrl-q\fP\&. .PP This option can also be set in \fBcontainers.conf\fP(5) file. .SS \fB--latest\fP, \fB-l\fP .PP Instead of providing the \fIcontainer ID\fP or \fIname\fP, use the last created \fIcontainer\fP\&. If other methods than Podman are used to run \fIcontainers\fP such as \fB\fCCRI-O\fR, the last started \fIcontainer\fP could be from either of those methods. .br The default is \fBfalse\fP\&. .br \fIIMPORTANT: 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.\fP .SS \fB--no-stdin\fP .PP Do not attach STDIN. The default is \fBfalse\fP\&. .SS \fB--sig-proxy\fP .PP Proxy received signals to the container process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. .PP The default is \fBtrue\fP\&. .SH EXAMPLES .PP Attach to a container called "foobar". .PP .RS .nf $ podman attach foobar .fi .RE .PP Attach to the latest created container. .PP .RS .nf $ podman attach --latest .fi .RE .PP Attach to a container that start with the ID "1234". .PP .RS .nf $ podman attach 1234 .fi .RE .PP Attach to a container without attaching STDIN. .PP .RS .nf $ podman attach --no-stdin foobar .fi .RE .SH SEE ALSO .PP \fBpodman(1)\fP, \fBpodman-exec(1)\fP, \fBpodman-run(1)\fP, \fBcontainers.conf(5)\fP