# Interactive Terminal

> What do the -i and -t flags do in docker run -it, and what happens if you use only one of them?

Canonical: https://www.internhack.in/learn/interview/docker-containers/docker-run-it-meaning
Last updated: 2026-11-28

Difficulty: Beginner

## Question

What do the -i and -t flags do in docker run -it, and what happens if you use only one of them?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

-i interactive, -t pseudo-TTY, STDIN, Detach keys, Not a TTY error

Previous: [Logging Drivers](https://www.internhack.in/learn/interview/docker-containers/docker-logging-drivers) · Next: [Removing Volumes with Containers](https://www.internhack.in/learn/interview/docker-containers/docker-rm-v-flag) · [All of Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)

## More Docker & Containers questions

- [ENV File](https://www.internhack.in/learn/interview/docker-containers/docker-env-file-loading)
- [Shared Memory](https://www.internhack.in/learn/interview/docker-containers/docker-shm-size)
- [Searching Hub](https://www.internhack.in/learn/interview/docker-containers/docker-search-command)
- [Updating Limits](https://www.internhack.in/learn/interview/docker-containers/docker-update-running-container)
- [Wait Command](https://www.internhack.in/learn/interview/docker-containers/docker-wait-command)
- [Checking Ports](https://www.internhack.in/learn/interview/docker-containers/docker-port-mapping-check)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)
