Menu
Coddy logo textTech

Different Distros

Part of the Introduction to Docker section of Coddy's Terminal journey — lesson 9 of 40.

Each image carries its own filesystem, so the same command can give different results depending on the image you run it in. A great example is /etc/os-release, a file every Linux distribution uses to describe itself:

docker run alpine cat /etc/os-release

Run inside alpine, this file says Alpine Linux. Run the very same command inside ubuntu:

docker run ubuntu cat /etc/os-release

and it says Ubuntu instead. The files genuinely differ because each image really ships a different operating system.

challenge icon

Challenge

Beginner

Read the /etc/os-release file inside an ubuntu container with cat and confirm it identifies as Ubuntu.

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Introduction to Docker