github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/docs/reference/commandline/ps.md (about) 1 # docker ps 2 3 <!---MARKER_GEN_START--> 4 List containers 5 6 ### Aliases 7 8 `docker container ls`, `docker container list`, `docker container ps`, `docker ps` 9 10 ### Options 11 12 | Name | Type | Default | Description | 13 |:-----------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 14 | `-a`, `--all` | | | Show all containers (default shows just running) | 15 | `-f`, `--filter` | `filter` | | Filter output based on conditions provided | 16 | `--format` | `string` | | Format output using a custom template:<br>'table': Print output in table format with column headers (default)<br>'table TEMPLATE': Print output in table format using the given Go template<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates | 17 | `-n`, `--last` | `int` | `-1` | Show n last created containers (includes all states) | 18 | `-l`, `--latest` | | | Show the latest created container (includes all states) | 19 | `--no-trunc` | | | Don't truncate output | 20 | `-q`, `--quiet` | | | Only display container IDs | 21 | `-s`, `--size` | | | Display total file sizes | 22 23 24 <!---MARKER_GEN_END--> 25