title: What is the difference between docker ps -all and docker ps --all
body: <p>The docker commands <a href="https://docs.docker.com/engine/reference/commandline/ps/" rel="nofollow noreferrer">reference for ps</a> mentions that </p>
  
  <pre><code>docker ps -a
  docker ps --all 
  </code></pre>
  
  <p>commands show the list of all containers.</p>
  
  <p>While working on dockers, I mistakenly was using the command</p>
  
  <pre><code>docker ps -all
  </code></pre>
  
  <p>and it gave me the list of last container I ran, even though <strong>its status was Exited only</strong>. </p>
  
  <p><a href="https://i.stack.imgur.com/kl0gp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kl0gp.png" alt="enter image description here"></a></p>
  
  <p>Wasted much time due to this confusion. Have been looking for its official reference and couldn't find any. I was wondering if its a bug or am I missing something.</p>