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

Share
Published by
ferisetyawanmyid

Recent Posts

Free Website Hosting Control Panel for Linux

If you run a VPS or dedicated server with Linux, you probably know that managing…

2 weeks ago

How to Find Out Who Rebooted Your Ubuntu Server (Step-by-Step Guide)

Short summary: Use built-in Linux tools (`who`, `last`, `journalctl`, `/var/log/auth.log`) and optional audit logs to…

2 weeks ago

🧾 Basic Linux Command Cheat Sheet for Beginners

Whether you're a new Linux user or a beginner sysadmin, mastering the terminal is a…

3 weeks ago

Best Free CMS Platforms for Self-Hosted Blogs and Websites [2025 Edition]

Choosing the right Content Management System (CMS) is key when you're building a blog, portfolio,…

3 weeks ago

🛡️ Protect Your Ubuntu Server with Fail2Ban: Step-by-Step Guide

Securing your Linux server is a critical task for every sysadmin. One of the simplest…

4 weeks ago

📡 Getting Started with tcpdump: A Beginner’s Guide for Linux Sysadmins

As a Linux system administrator, understanding what happens on your network is crucial. One of…

1 month ago

This website uses cookies.