A Docker terminal is any command-line window from which you can run Docker CLI commands. Depending on your setup, this may be Windows Terminal, PowerShell, Command Prompt, the macOS Terminal app, a Linux shell, or a terminal opened inside Docker Desktop.
This tutorial explains how to open a Docker terminal, confirm that Docker is running, execute a test container, and open a shell inside an existing container. It also retains the Docker Toolbox instructions for users maintaining older installations.
Open a Docker Terminal on Windows, macOS, or Linux
Open Docker Terminal on Windows
Start Docker Desktop and wait until its Docker engine is running. You can then open Windows Terminal, PowerShell, or Command Prompt from the Start menu. Docker commands work in any of these terminals when the Docker CLI is installed and available in the system path.
docker version
Open Docker Terminal on macOS
Open Docker Desktop from the Applications folder and wait for it to finish starting. Next, open the Terminal app from Applications > Utilities, or search for Terminal with Spotlight.
docker version
Open Docker Terminal on Ubuntu or Another Linux Distribution
Open your normal terminal application. On Ubuntu, you can commonly open it with Ctrl+Alt+T. Docker Engine must be installed and the Docker daemon must be running before Docker commands can communicate with it.
docker version
sudo systemctl status docker
If your user account is not configured to run Docker directly, a Linux installation may require sudo docker. Follow the security practices used for your system before adding a user to the Docker group.
Open the Integrated Terminal in Docker Desktop
Recent Docker Desktop versions provide terminal access through the application interface. Open Docker Desktop, select Containers, locate a running container, and use its terminal or exec option. The exact button name and placement can vary by Docker Desktop version.
This integrated terminal opens a command session inside the selected container. It is different from opening PowerShell, Command Prompt, or Terminal on the host computer.
Open Docker Quickstart Terminal for Legacy Docker Toolbox
Docker Toolbox was used on older Windows and macOS systems that could not run the newer Docker Desktop environment. It normally created a Docker Quickstart Terminal shortcut in the Start menu and on the desktop.
Double-click the shortcut to open Docker Quickstart Terminal. The terminal starts or connects to the VirtualBox virtual machine used by Docker Toolbox and configures the environment variables required by the Docker client.
Docker Quickstart Terminal Window

When you open Docker Quickstart Terminal for the first time after installing Docker Toolbox, you may be asked for permission to create or configure components required by VirtualBox. The initial startup can also create a default Docker virtual machine.
After the environment is ready, you can run Docker commands from this terminal.
Check Whether the Docker CLI Can Reach the Docker Engine
Before running a container, use the following commands to verify the installation. The first command displays Docker CLI details. The second requests information from the Docker engine.
docker --version
docker info
If docker --version works but docker info reports that it cannot connect to the daemon, the Docker CLI is installed but the Docker engine is not running or is not reachable through the current Docker context.
Run the Docker hello-world Container from the Terminal
Run the following command to test the Docker client, Docker engine, image download process, and container runtime.
$ docker run hello-world

The docker run hello-world command creates and starts a container from the hello-world image. If the image is not already stored locally, Docker downloads it before creating the container.
- The Docker client sends the run request to the Docker engine.
- The Docker engine checks whether the
hello-worldimage is available locally. - If necessary, Docker pulls the appropriate image layers from the configured container registry.
- The Docker engine creates a container from the image and starts its executable.
- The container writes its message, and Docker forwards that output to your terminal.
Useful Docker Terminal Commands After hello-world
The following commands help you inspect images and containers after testing the installation.
# Show running containers
docker ps
# Show running and stopped containers
docker ps -a
# Show locally available images
docker images
# Show Docker system information
docker info
The hello-world container normally exits immediately after printing its message. Therefore, it may appear in docker ps -a but not in docker ps.
Open a Shell Inside a Running Docker Container
To work inside an existing container, first list the running containers and identify the required container name or ID.
docker ps
Use docker exec to start an interactive shell inside the container. Many Linux containers include sh, while some also include bash.
docker exec -it container_name sh
If Bash is installed in the container, you can use:
docker exec -it container_name bash
Replace container_name with the actual container name or ID shown by docker ps. A minimal container may not include Bash, so try sh when a Bash command returns an executable-not-found error.
Run Docker Commands in Windows CMD or PowerShell
Docker does not require a special terminal on a current Docker Desktop installation. After Docker Desktop starts, you can run the same Docker CLI commands in Command Prompt, PowerShell, or Windows Terminal.
docker --version
docker run hello-world
docker ps -a
If Windows reports that docker is not recognized as a command, restart the terminal after installation. If the problem remains, verify that Docker Desktop is installed correctly and that the Docker CLI directory is available in the system path.
Docker Terminal Errors and Their Likely Causes
Cannot Connect to the Docker Daemon
This message usually means that the Docker engine is stopped, still starting, or inaccessible from the current environment. Start Docker Desktop on Windows or macOS. On Linux, check the Docker service and your account permissions.
Docker Command Is Not Recognized or Not Found
This error indicates that the Docker CLI is not installed or is not available through the terminal’s path. Confirm the installation, close and reopen the terminal, and then run docker --version.
Permission Denied While Connecting to the Docker Socket
This Linux error means that the current user cannot access the Docker daemon socket. Use the permission method approved for your system. Running Docker with elevated privileges or changing Docker group membership has security implications and should be handled deliberately.
Bash Is Missing Inside the Container
Small container images often omit Bash. Open the container with sh, or use another shell that is actually included in the image.
Docker Terminal Frequently Asked Questions
How do I open the Docker terminal?
Start Docker Desktop and open your normal system terminal, such as PowerShell on Windows or Terminal on macOS. You can also open an integrated terminal for a running container from the Containers section of Docker Desktop.
What is Docker in a terminal?
Docker in a terminal refers to the Docker command-line interface. The docker command sends instructions to the Docker engine to build images, run containers, inspect resources, view logs, and perform other container-management tasks.
How do I run Docker in Windows CMD?
Start Docker Desktop, open Command Prompt, and run a command such as docker version or docker run hello-world. A separate Docker-specific CMD window is not required for a current Docker Desktop installation.
What is the difference between a host terminal and a container terminal?
A host terminal runs commands on your Windows, macOS, or Linux computer. A container terminal runs commands inside a specific container and can access only the tools, files, environment variables, and permissions available in that container.
Why does the hello-world container stop immediately?
The container’s program only prints a test message and then finishes. Once its main process exits, the container enters the stopped state. You can still see it with docker ps -a.
Docker Terminal Editorial QA Checklist
- Confirm that the tutorial distinguishes Docker Desktop from the legacy Docker Toolbox and Docker Quickstart Terminal.
- Verify that Windows, macOS, and Linux terminal-opening instructions remain accurate for supported Docker installations.
- Test
docker version,docker info, anddocker run hello-worldon a clean Docker environment. - Check that the
docker execexamples explain when to useshinstead ofbash. - Review Linux permission guidance so that it does not recommend changing Docker socket or group access without noting the security implications.
TutorialKart.com