# Exec Form vs. Shell Form

> Explain the difference between the exec form and the shell form of CMD, ENTRYPOINT and RUN. Why does it matter for signals and graceful shutdown?

Canonical: https://www.internhack.in/learn/interview/docker-containers/docker-exec-vs-shell-form
Last updated: 2026-11-28

Difficulty: Intermediate

## Question

Explain the difference between the exec form and the shell form of CMD, ENTRYPOINT and RUN. Why does it matter for signals and graceful shutdown?

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

## Concepts covered

Exec form, Shell form, PID 1, SIGTERM, Graceful shutdown, tini

Previous: [.dockerignore](https://www.internhack.in/learn/interview/docker-containers/docker-ignore-file) · Next: [Bind Mount Permissions](https://www.internhack.in/learn/interview/docker-containers/docker-bind-mount-permissions) · [All of Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)

## More Docker & Containers questions

- [Cleanup Commands](https://www.internhack.in/learn/interview/docker-containers/docker-prune-cleanup)
- [Restart Policies](https://www.internhack.in/learn/interview/docker-containers/docker-container-restart-policy)
- [Inspecting Network](https://www.internhack.in/learn/interview/docker-containers/docker-inspect-network)
- [ARG vs. ENV](https://www.internhack.in/learn/interview/docker-containers/docker-build-args-vs-env)
- [Docker Diff](https://www.internhack.in/learn/interview/docker-containers/docker-diff-command)
- [Save vs. Export](https://www.internhack.in/learn/interview/docker-containers/docker-save-vs-export)

## 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)
