Chroot Into Linux Mint From Ubuntu — Like Containers, Without the Overhead

Yash PalYash Pal
5 min read

Have you ever wanted to explore Linux Mint without rebooting or spinning up a virtual machine? What if you could just drop into a Linux Mint shell from your existing Ubuntu system?

That’s exactly what we’ll do here — using the power of chroot, you can switch into a Linux Mint environment without leaving your current distro.


What is chroot?

chroot is a Unix command that changes the apparent root directory for a running process. It's like booting into a different OS — but without actually restarting your system.

We'll use this to simulate a Linux Mint system inside Ubuntu — with full access to Mint’s shell, package manager, and tools.


What You'll Need

  • A Debian/Ubuntu-based host (Ubuntu, Pop!_OS, Debian, etc.)

  • Internet connection

  • 2–3 GB of free disk space


Step 1: Install Required Tools

Let’s install the tools needed to extract and mount the Mint ISO.

sudo apt update
sudo apt install curl squashfs-tools
  • curl — to download the ISO

  • squashfs-tools — to extract the root filesystem


Step 2: Download and Mount the Linux Mint ISO

Create a working directory and download the Mint ISO:

cd ~
mkdir -p linuxmint/{iso,mnt,rootfs}
cd linuxmint

curl -O https://mirrors.edge.kernel.org/linuxmint/stable/21.3/linuxmint-21.3-cinnamon-64bit.iso

Now mount the ISO to access its contents:

sudo mount -o loop linuxmint-21.3-cinnamon-64bit.iso mnt

The ISO is now mounted at mnt/, and you’ll find the root filesystem inside the casper/ folder.


Step 3: Extract the Mint Root Filesystem

We’ll now extract Mint’s full root filesystem using unsquashfs:

sudo unsquashfs -d rootfs mnt/casper/filesystem.squashfs

Once extraction is done, clean up:

sudo umount mnt
rm linuxmint-21.3-cinnamon-64bit.iso

At this point, rootfs/ contains a complete Linux Mint userland environment.


Step 4: Set Up the Chroot Environment

To make Mint's environment function correctly (with devices, network, etc.), mount a few essential directories:

cd ~
cd linuxmint

sudo mount --bind /dev rootfs/dev
sudo mount --bind /dev/pts rootfs/dev/pts
sudo mount --bind /proc rootfs/proc
sudo mount --bind /sys rootfs/sys
sudo cp /etc/resolv.conf rootfs/etc/resolv.conf

Here’s what each mount does:

MountPurpose
/devAccess to hardware and devices
/dev/ptsTerminal I/O for bash and tools
/procRuntime system info
/sysKernel and hardware info
resolv.confEnables DNS for network access

Step 5: Chroot into Linux Mint

Now you’re ready to enter the Mint environment:

sudo chroot rootfs /bin/bash

Boom! You're now "inside" Linux Mint, running on top of your current system.

Try a few commands:

lsb_release -a
cat /etc/linuxmint/info
apt update

Yes — you can install packages, run Mint tools, and more, just like you would in a normal Mint system.


Step 6: Exit and Clean Up

When you're done, type:

exit

Then unmount everything cleanly:

sudo umount rootfs/dev/pts
sudo umount rootfs/dev
sudo umount rootfs/proc
sudo umount rootfs/sys

You’re back to your main Ubuntu system — but now with a powerful new trick up your sleeve.


Why Use This?

  • Safe environment for testing Mint tools or packages

  • Great for debugging or experimenting

  • Avoids the need for a VM or dual-boot setup

  • Lightweight, fast, and easily scriptable


Bonus Tip: Want Other Distros?

You can do the same with:

  • Alpine (via mini rootfs tarballs)

  • Debian (via debootstrap or netboot rootfs)

  • Arch Linux (via bootstrap tarballs)


🐳 Bonus: This Is How Docker and Kubernetes Got Started!

You’ve just entered a full Linux Mint environment from Ubuntu — no reboot, no VM. Guess what? That’s not too far from how containers started.

The chroot command laid the groundwork for modern containerization. While it's a bit old-school now, its core concept — isolating one Linux environment inside another — is what evolved into powerful tools like:

  • Docker, which adds layers like filesystem overlays, image layers, and runtime management.

  • Kubernetes (k8s), which takes containers and orchestrates them at scale across clusters.

In fact, when Kubernetes runs your containers in Pods, it uses container runtimes (like containerd or CRI-O) that apply these same principles:

  • chroot-like root isolation (via mount namespaces)

  • 🧠 Linux namespaces to isolate network, processes, users

  • 💪 cgroups to control resource usage (CPU, memory, etc.)

  • 🔐 Extra layers like seccomp, AppArmor, and user namespaces for security

So if you understood this chroot demo — you’ve peeked into the foundations of containers, and you’re better equipped to learn how Docker and Kubernetes work under the hood.

Next time you spin up a pod in Kubernetes or a container in Docker, just remember — it all started with tools like chroot. 🔧🐧


👉 Want to see how Docker uses these internals? Check out my deep dive here.


And That’s a Wrap — Mint Without the Reboot!

Who needs a virtual machine when you can drop into a full Linux Mint environment from your current system? With just a few commands, you explored chroot, mounted a real Mint rootfs, and ran it like magic — no reboot, no VM, no hassle.

It’s fast. It’s fun. And it’s a super handy trick for testing, debugging, or just poking around another distro.


🧠 Still Curious?

Try this with Alpine, Debian, or even Arch — every distro has its flavor of rootfs you can experiment with.
Linux gives us the tools — it’s up to us to get creative. 🔧🐧


🤝 Let’s Stay in Touch!

If you found this guide useful or fun, I’d love to hear from you!
Your feedback keeps me writing and your questions might inspire the next blog post (and yes — shoutouts included 👀).

📬 Let’s Connect:

💬 Drop a comment if you hit a roadblock or want a follow-up — maybe a part 2 where we try chroot with Alpine or Arch?


🚀 Until Next Time…

Keep exploring, stay curious, and never be afraid to break (and fix) your system — that’s where the best learning happens.
Happy hacking! 🐧

0
Subscribe to my newsletter

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

Written by

Yash Pal
Yash Pal

Hey I am a budding developer who is passionate to learn tech and explore the domains Computer Science has to offer. I also like to contribute to Open Source, help others and also learn from seasoned engineers in the process.