Copy-ready commanddocker exec — Basic Usage
docker exec -it web01 /bin/shRequirements and permissions
- Requirements
- Docker Engine, Docker Compose, or kubectl
- Permissions
- Container or cluster permissions vary
- Last reviewed
- 2026-07-31
Examples
Basic Usage
Use docker exec for a standard administrative task.
docker exec -it web01 /bin/shOriginal command
Run a command inside a container.
docker exec -it web01 /bin/shCommon errors
Command not found
Confirm Docker Engine, Docker Compose, or kubectl is installed and available in your current shell.