Minimal Terminals in Dockerš³: Why Your Ubuntu Isnāt Really Ubuntu (Yet!)

ā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
needsncurses-bin
, which isnāt installed by default.ping
needsiputils-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
Subscribe to my newsletter
Read articles from Jasmeet Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
