← All commands
Topic hub Containers & Virtualization
Windows Linux Containers & Virtualization Docker

Windows Docker Desktop docker exec equivalent in Linux

Runs an interactive shell inside a running container.

Windows Docker Desktop docker exec
Linux equivalents
Debian/Ubuntu docker.io or Docker Engine
docker exec -it CONTAINER sh
Fedora podman preferred / docker optional
podman exec -it CONTAINER sh
Arch docker
docker exec -it CONTAINER sh

Overview

What this command does

Runs an interactive shell inside a running container.

Migration tip: Check the distro-specific rows before copying; package names and service names can differ even when the tool name is similar.

Practical tasks

Common use cases

Open shell in container

Runs an interactive shell inside a running container.

docker exec -it CONTAINER sh

Open shell in container

docker --help

Show command help when supported

man docker

Open the manual page when installed

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

docker exec -it CONTAINER sh

Walkthrough

Examples with explanations

# Windows equivalent: Docker Desktop docker exec
docker exec -it CONTAINER sh

Reference

Common options and variations

Command or optionUse
docker exec -it CONTAINER shOpen shell in container
docker --helpShow command help when supported
man dockerOpen the manual page when installed

Distro differences

Debian/Ubuntu vs Fedora vs Arch

The equivalent is shown for Debian/Ubuntu, Fedora and Arch. Some rows use a different package manager or helper tool where Linux distributions commonly diverge.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu docker.io or Docker Engine docker exec -it CONTAINER sh Same command on this distribution.
Fedora podman preferred / docker optional podman exec -it CONTAINER sh Equivalent workflow for this distribution.
Arch docker docker exec -it CONTAINER sh Same command on this distribution.

Keep learning

Related Containers & Virtualization commands