Minimal Terminals in Docker🐳: Why Your Ubuntu Isn’t Really Ubuntu (Yet!)

Jasmeet SinghJasmeet Singh
2 min read

ā€œWhy is clear not found, but vim works just fine in my Docker container?ā€
That was my exact question recently, and the answer opened up a fun learning rabbit hole.


šŸ”¹ Setting the Scene

I spun up an Ubuntu container on Docker Desktop for testing scripts:

docker run -it ubuntu bash

All good so far. Then I typed:

clear

And got this:

bash: clear: command not found

Wait, what?


šŸ” Why Some Commands Are Missing

The Ubuntu image from Docker Hub is intentionally minimal. It’s designed to run light and fast, so it doesn’t include full utilities unless absolutely necessary.

🧱 For example:

  • clear needs ncurses-bin, which isn’t installed by default.

  • ping needs iputils-ping → also missing.

  • htop, curl, wget, and friends? You’ll need to install them manually.


šŸ¤” But vim Works?!

Yes → and here’s the catch:

Most minimal Ubuntu images include vim.tiny by default → a stripped-down version of Vim with just the essentials. It’s often aliased or symlinked as vim.

So while it’s not the full vim package, it’s good enough for quick edits inside a container.


šŸ”§ Fixing Missing Tools

If you want your container to feel like a ā€œrealā€ Linux machine:

apt update && apt install -y ncurses-bin iputils-ping curl

Want full Vim?

apt install vim

šŸ’” Why Use Minimal Terminals at All?

āœ… Pros:

  • Smaller size (faster pulls)

  • Fewer dependencies (more secure)

  • Clean base for custom images

āŒ Cons:

  • Missing familiar commands

  • Not beginner-friendly

  • Troubleshooting requires extra installs


šŸ›  Pro Tip: Build a Dev-Friendly Ubuntu Container

Here’s a simple Dockerfile if you want a full Linux playground inside Docker:

FROM ubuntu:latest

RUN apt update && apt install -y \
    vim curl iputils-ping net-tools htop ncurses-bin

Build and run it:

docker build -t my-dev-ubuntu .
docker run -it my-dev-ubuntu

šŸ‘Øā€šŸ’» Final Thought

Docker containers can feel minimal because they are.
But with just a few commands, you can transform them into powerful Linux environments for testing, scripting, or learning.

Next time something doesn’t work inside a container, take a pause and ask:
ā€œIs it missing… or just not installed yet?ā€


#Docker #Ubuntu #Linux #DevOps #Containers #Terminal #LearningLinux #DockerTips #MinimalOS #Vim #JasmeetSingh

1
Subscribe to my newsletter

Read articles from Jasmeet Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jasmeet Singh
Jasmeet Singh