Categories: How ToServers

How to stop all Docker Containers

To stop all Docker containers simply run the following command in your terminal:

docker kill $(docker ps -q)

How It Works

  1. The docker ps command will list all running containers.
  2. The -q flag will only list the IDs for those containers.
  3. Once we have the list of all container IDs, we can simply run the docker kill command, passing all those IDs, and they’ll all be stopped!
ferisetyawanmyid

🚀 Certified Linux System Administrator | DevOps | Server Optimization | Cybersecurity | DRC Solutions

Recent Posts

How to Install CyberPanel on Ubuntu 24.04 LTS (Step-by-Step Guide)

CyberPanel is a modern web hosting control panel powered by OpenLiteSpeed, designed for high performance,…

7 days ago

Welcome to My Personal Blog

🚀 Certified Linux System Administrator | DevOps | Server Optimization | Cybersecurity | DRC Solutions…

2 weeks ago

10 Essential Linux Commands Every SysAdmin Should Know

As a Linux System Administrator, mastering the command line is key to efficiently managing servers,…

2 months ago

🚀 How to Install WireGuard with Docker on Ubuntu 24.04 (wg-easy Dashboard)

Introduction WireGuard is a fast, lightweight, and modern VPN protocol designed for simplicity and performance.If…

3 months ago

How To Install Certbot on Ubuntu 24.04: Set Up Let’s Encrypt for Apache and Nginx

Securing your website with HTTPS is essential for privacy, SEO ranking, and user trust. Let’s…

3 months ago

Best SSH Clients for Linux: Top Tools for Secure Remote Connections

If you manage Linux servers regularly, you know how important SSH (Secure Shell) is. Whether…

3 months ago

This website uses cookies.