Run an interactive shell inside a new container.
Section: Containers
Run interactively
bash
bash
docker run -it ubuntu:24.04 bashExplanation
Useful for exploration, debugging, and ephemeral workspaces.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Containers