# Demonstration: What "Shares the Host Kernel" Actually Looks Like ## OBSERVE ``` $ uname -r 5.15.0-real-host-kernel $ docker run --rm alpine:3.19 uname -r 5.15.0-real-host-kernel ``` ## HYPOTHESIS Predict: would a real virtual machine show the SAME kernel version as its host, the way this container just did? ## INSPECT A real VM runs its OWN independent kernel — it would very likely show a DIFFERENT version (or even a different OS entirely) than its host, because a VM virtualizes the hardware and boots a complete, separate operating system on top of it. ## CHANGE ``` $ docker run --rm ubuntu:22.04 uname -r 5.15.0-real-host-kernel ``` Even a completely different container OS (`ubuntu` here, vs. `alpine` before) STILL reports the exact same kernel version — because there's only ONE real kernel involved, the host's. ## VERIFY This is the concrete, observable meaning of "containers share the host kernel": no matter what container image you run, `uname -r` always reports the same real kernel underneath — this is exactly why containers start in a fraction of a second (no separate kernel to boot) and exactly the tradeoff the lesson named. ## Instructor Notes **Demo goal:** Make "shares the host kernel" a concrete, checkable fact rather than an abstract architectural claim. **Approximate timing:** 8 minutes live. **Common mistake to watch for:** assuming different container images run different kernels because their USERSPACE (installed tools, package manager) looks completely different — the kernel underneath is unified regardless.