> For the complete documentation index, see [llms.txt](https://notes.eliasnorrby.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.eliasnorrby.com/podman/target-last-container.md).

# Target last container

`podman` remembers the last container used in any command. To target it again without referencing a container name or id, use the `-l` flag:

```bash
$ podman inspect hello-world
$ podman exec -l ls /tmp
```
