podman-restart(1)
π podman-restart(1) β the manual page bestie π
okay so this is the podman-restart manual page, and honestly? it's giving "I just need to restart this one container" energy. we're gonna walk through it together, no cap. β¨
πΈ NAME πΈ
podman-restart β restart one or more containers π«Ά
π οΈ SYNOPSIS π οΈ
podman restart [options] container ...
podman container restart [options] container ...
bestie, it's literally that simple: options first, then one or more containers. π
π DESCRIPTION π
so the restart command lets you restart containers using their ID or name, periodt. here's the vibe:
- if the container is running, it gets stopped and then restarted π
- if the container is stopped, it just gets started up π±
that's it. that's the whole plot. iconic. π
β¨ OPTIONS β¨
okay bestie, here's the full menu. every flag, every vibe. don't skip any of these, iykyk. π
--all,-aβ restart all containers, no matter what state they're currently in. literally all of them. π₯--cidfileβ read the container ID from the file you specify, then restart that container. you can use this multiple times. ngl, useful. π--filter,-f=filterβ filter which containers get restarted. you can stack multiple filters by using--filtermultiple times. here's the tea β:- filters with the same key work inclusive β except
label, which is exclusive (she's different, she's main character energy) - filters with different keys always work exclusive
- filters with the same key work inclusive β except
valid filters are listed below, and yes, we're listing every single one because bestie deserves the full picture:
idβ [ID] Container's ID (CID prefix match by default; accepts regex) πnameβ [Name] Container's name (accepts regex) π·οΈannotationβ [Key] or [Key=Value] Annotation assigned to a container πannotation!β [Key] or [Key=Value] Annotation NOT assigned to a container π ββοΈlabelβ [Key] or [Key=Value] Label assigned to a container πlabel!β [Key] or [Key=Value] Label NOT assigned to a container π«exitedβ [Int] Container's exit code π’statusβ [Status] Container's status:'created','initialized','running','stopped','paused','exited','removing','stopping','unknown'πancestorβ [ImageName] Image or descendant used to create container (accepts regex) π§¬beforeβ [ID] or [Name] Containers created before this container βͺsinceβ [ID] or [Name] Containers created since this container β©volumeβ [VolumeName] or [MountpointDestination] Volume mounted in container πΎhealthβ [Status]healthyorunhealthyπ©Ίpodβ [Pod] name or full or partial ID of pod π«networkβ [Network] name or full ID of network πrestart-policyβ [Policy] Container's restart policy (e.g.,'no','on-failure','always','unless-stopped') πuntilβ [DateTime] Containers created before the given duration or time. β°commandβ [Command] the command the container is executing, onlyargv[0]is taken π₯οΈshould-start-on-bootβ [Bool] Containers that need to be restarted after system reboot.Truefor containers with restart policy'always', or'unless-stopped'that were not explicitly stopped by the user π
--latest,-lβ instead of giving a container name or ID, just use the last created container. but bestie, listen: β οΈ the last started container can be from other users of Podman on the host machine. also, this option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. π--runningβ restart all containers that are already in the running state. only the running girlies. π--time,-t=secondsβ seconds to wait before forcibly stopping the container. use-1for infinite wait. β³
π¦ EXAMPLES π¦
okay these examples are literally the moment. copy them, run them, slay. π
restart the latest container.
$ podman restart -l
ec588fc80b05e19d3006bf2e8aa325f0a2e2ff1f609b7afb39176ca8e3e13467
restart a specific container by partial container ID.
$ podman restart ff6cf1
ff6cf1e5e77e6dba1efc7f3fcdb20e8b89ad8947bc0518be1fcb2c78681f226f
restart two containers by name with a timeout of 4 seconds.
$ podman restart --time 4 test1 test2
c3bb026838c30e5097f079fa365c9a4769d52e1017588278fa00d5c68ebc1502
17e13a63081a995136f907024bcfe50ff532917988a152da229db9d894c5a9ec
restart all running containers.
$ podman restart --running
restart all containers.
$ podman restart --all
restart container using ID specified in a given files.
$ podman restart --cidfile /home/user/cidfile-1
$ podman restart --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2
restart container by name.
$ podman restart --filter name=id-name-test
restart container by label.
$ podman restart --filter label=app=label-test
restart container by exit code.
$ podman restart --filter exited=0
restart container by status.
$ podman restart --filter status=running
restart container by ancestor image.
$ podman restart --filter ancestor=nginx
restart containers created before another.
$ podman restart --filter before=second
restart containers created since another.
$ podman restart --filter since=first
restart container by volume.
$ podman restart --filter volume=vol-filter
restart containers in a pod.
$ podman restart --filter pod=mypod
restart container by network.
$ podman restart --filter network=net-filter
restart containers created until time.
$ podman restart --filter until=10s
π SEE ALSO π
podman(1)β the main character. go read it. π«Ά
π HISTORY π
March 2018, originally compiled by Matt Heon mheon@redhat.com β¨mailto:mheon@redhat.comβ©. a legend, fr fr. π«‘
and that's the whole page, bestie!! π you're now officially a podman-restart expert. go forth and restart things responsibly. π
podman-restart(1) β General Commands Manual β source/version podman-restart(1) β date March 2018 πβ¨π¦
π¦ where this page comes from
- arch rolling: podman-docker 6.1.4-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms