github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-restart.1.md (about)

     1  % podman-restart(1)
     2  
     3  ## NAME
     4  podman\-restart - Restart one or more containers
     5  
     6  ## SYNOPSIS
     7  **podman restart** [*options*] *container* ...
     8  
     9  **podman container restart** [*options*] *container* ...
    10  
    11  ## DESCRIPTION
    12  The restart command allows containers to be restarted using their ID or name.
    13  Containers will be stopped if they are running and then restarted. Stopped
    14  containers will not be stopped and will only be started.
    15  
    16  ## OPTIONS
    17  #### **--all**, **-a**
    18  Restart all containers regardless of their current state.
    19  
    20  #### **--latest**, **-l**
    21  Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
    22  to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
    23  
    24  #### **--running**
    25  Restart all containers that are already in the *running* state.
    26  
    27  #### **--time**, **-t**=*seconds*
    28  
    29  Seconds to wait before forcibly stopping the container.
    30  
    31  ## EXAMPLES
    32  
    33  Restart the latest container
    34  ```
    35  $ podman restart -l
    36  ec588fc80b05e19d3006bf2e8aa325f0a2e2ff1f609b7afb39176ca8e3e13467
    37  ```
    38  
    39  Restart a specific container by partial container ID
    40  ```
    41  $ podman restart ff6cf1
    42  ff6cf1e5e77e6dba1efc7f3fcdb20e8b89ad8947bc0518be1fcb2c78681f226f
    43  ```
    44  
    45  Restart two containers by name with a timeout of 4 seconds
    46  ```
    47  $ podman restart --time 4 test1 test2
    48  c3bb026838c30e5097f079fa365c9a4769d52e1017588278fa00d5c68ebc1502
    49  17e13a63081a995136f907024bcfe50ff532917988a152da229db9d894c5a9ec
    50  ```
    51  
    52  Restart all running containers
    53  ```
    54  $ podman restart --running
    55  ```
    56  
    57  Restart all containers
    58  ```
    59  $ podman restart --all
    60  ```
    61  
    62  ## SEE ALSO
    63  **[podman(1)](podman.1.md)**
    64  
    65  ## HISTORY
    66  March 2018, Originally compiled by Matt Heon <mheon@redhat.com>