Skip to content

You ask four people how to start practicing Linux, and you get four different answers:

  • “Install WSL. It is already part of Windows.”
  • “Put Ubuntu on a USB stick and start the computer from it.”
  • “Make a virtual machine.”
  • “Remove Windows and install Linux. That is the only way to really learn.”

Each answer gives you a Linux system with a prompt. Later in this course, you will change settings, stop services, remove files, and make mistakes on purpose. One of the four setups lets you undo that with a few clicks. With others, a mistake can reach your own files.

By the end of this lesson, you can compare the four setups with four questions, say which one fits which job, and explain why this course uses a full virtual machine.

Bare metal. Linux is installed on the computer’s own storage and runs directly on the hardware. If it shares the computer with another operating system, such as Windows, you choose one at startup; this is dual booting, and only one runs at a time.

Live media. You copy an installation image of Ubuntu Desktop to a USB stick and start the computer from it. On the first screens, Try Ubuntu starts a complete desktop from the USB stick without installing anything: a live session. The same stick can also install Ubuntu on bare metal.

A virtual machine. A virtual machine, or VM, is a simulated computer that runs as a program on your computer. The VirtualBox manual uses two terms for the two sides:

  • The host is “the physical computer, such as a laptop or server, where you run VirtualBox”, with its own operating system, the host OS.
  • The guest OS is “the OS that is running inside a virtual machine”.

The guest has virtual hardware: a number of CPUs, an amount of memory, and a virtual disk, which is a file on the host that the guest uses as its storage drive. A full VM runs a complete guest OS, with its own kernel.

WSL. The Windows Subsystem for Linux is a feature of Windows that runs a Linux distribution, such as Ubuntu, alongside Windows. It exists in two versions that work in different ways:

  • WSL 1 has no Linux kernel. It translates the requests of Linux programs, their system calls (lesson B01.1), into requests to Windows.
  • WSL 2 runs a real Linux kernel. Microsoft’s documentation says it runs “a Linux kernel inside of a lightweight utility virtual machine (VM)”. Windows creates and manages that VM for you. WSL 2 is the default.
  1. Isolation. If something goes wrong inside Linux, what else can it reach: your own files, your other operating system, the computer’s disks?
  2. Persistence. After you restart, are your files and changes still there?
  3. Hardware access. Does Linux use the real hardware, or devices that are simulated for it?
  4. Snapshots. Can you save the whole system’s state and return to it later? A snapshot is such a saved state. The VirtualBox manual says it lets you “save a particular state of a virtual machine for later use”.

The answers depend mostly on two things: where the Linux kernel runs, and what sits between it and the hardware.

Guess first: in WSL 2, the Ubuntu distribution runs on a Linux kernel. Is it Ubuntu’s kernel, as in lesson B01.3?

Check your guess

No. The kernel in WSL 2 is built by Microsoft from the kernel source code, and Windows updates it. The user space is Ubuntu’s: its libraries, its shell, its package manager. So a lesson that depends on how Ubuntu’s own kernel behaves may not match what you see in WSL 2.

Now compare a full VM, WSL 2, and a live USB session side by side:

Where Linux runs: a full VM, WSL 2, and a live USB session In a full VM, Ubuntu user space and the guest's own Ubuntu kernel run inside the VM, on VirtualBox, on your host OS (Windows, macOS, or Linux), on the hardware; after a restart, everything is kept on the VM's virtual disk. In WSL 2, the Hyper-V hypervisor runs on the hardware, and two systems run side by side on it: Windows, the host OS, and a managed VM where Ubuntu user space runs on a Linux kernel built by Microsoft; after a restart, everything is kept in an ext4.vhdx file. In a live USB session, Ubuntu is the only OS running: its user space and the Ubuntu kernel from the USB stick run directly on the hardware, with no host OS; after a restart, changes are lost by default. Full VM WSL 2 Live USB session VM (guest) Ubuntu user space Ubuntu kernel the guest's own VirtualBox Host OS Windows, macOS, or Linux Windows host OS Managed VM (guest) Ubuntu user space Linux kernel built by Microsoft Hyper-V the hypervisor, runs on the hardware Only OS running Ubuntu user space Ubuntu kernel from the USB stick No host OS the kernel runs on the hardware Hardware Hardware Hardware After a restart Kept on its virtual disk Kept in an ext4.vhdx file Lost by default
Where Linux runs: a full VM, WSL 2, and a live USB session In a full VM, Ubuntu user space and the guest's own Ubuntu kernel run inside the VM, on VirtualBox, on your host OS (Windows, macOS, or Linux), on the hardware; after a restart, everything is kept on the VM's virtual disk. In WSL 2, the Hyper-V hypervisor runs on the hardware, and two systems run side by side on it: Windows, the host OS, and a managed VM where Ubuntu user space runs on a Linux kernel built by Microsoft; after a restart, everything is kept in an ext4.vhdx file. In a live USB session, Ubuntu is the only OS running: its user space and the Ubuntu kernel from the USB stick run directly on the hardware, with no host OS; after a restart, changes are lost by default. Full VM VM (guest) Ubuntu user space Ubuntu kernel the guest's own VirtualBox Host OS Windows, macOS, or Linux Hardware After a restart: kept on its virtual disk WSL 2 Windows host OS Managed VM (guest) Ubuntu user space Linux kernel built by Microsoft Hyper-V, the hypervisor, runs on the hardware Hardware After a restart: kept in an ext4.vhdx file Live USB session Only OS running Ubuntu user space Ubuntu kernel from the USB stick No host OS the kernel runs on the hardware Hardware After a restart: lost by default
Simplified model. Where Linux runs in three setups: in a full VM, the guest runs in VirtualBox on a host OS; in WSL 2, Windows and a managed VM run side by side on Hyper-V; in a live USB session, Ubuntu is the only OS. A full VM and WSL 2 keep your changes after a restart; a live session loses them by default.

Read the diagram from the bottom up.

  • Full VM. The hardware runs your host OS: Windows, macOS, or Linux. VirtualBox runs on the host OS, and inside the VM the guest has its own Ubuntu kernel and user space. The dashed line is the boundary between guest and host. The guest stores everything on its virtual disk, so it is kept after a restart.
  • WSL 2. The bottom layer is different. A hypervisor is software that runs virtual machines; VirtualBox is one, and it runs as a program on the host OS. WSL 2 uses Hyper-V, Microsoft’s hypervisor, which sits directly on the hardware. Windows then runs on Hyper-V too, beside the managed VM. Windows is still the host OS, because it starts and manages the VM. Your Linux files are kept in a virtual disk file, ext4.vhdx.
  • Live USB session. No other operating system runs. The Ubuntu kernel from the USB stick runs directly on the hardware, so there is no host and no guest. By default, the session keeps nothing.

Guess first: in a live session, you save a file on the desktop, then restart from the same USB stick. Is the file there?

Check your guess

No. Ubuntu’s documentation describes the live session as a way to try Ubuntu “without making any permanent changes”. What you change in the session, including files on its desktop, is gone after a restart.

But the opposite trap exists too. A live session runs on the real hardware, so it can open the computer’s internal disk and any USB drive. A file you save there stays, and a file you delete there is gone.

Bare metal is not in the diagram, because it has no layers to compare: Linux and its kernel run on the hardware, and everything is kept on the computer’s own disk.

Full VM (VirtualBox) WSL 2 Live USB session Bare metal
Isolation Strong: own kernel and disk; host files only through a shared folder you set up Partial: own kernel, but Windows drives at /mnt/c None for storage: it can open the internal disks None: Linux is the system
Persistence Kept on the virtual disk Kept in ext4.vhdx Lost by default Kept
Hardware access Virtual devices; a host USB device can be passed in USB through usbipd-win; no serial ports The real hardware The real hardware
Snapshots Yes, restored with a few clicks No; wsl --export saves a copy Not applicable No; only backups
Suits this course? Yes: the reference Partly: kernel, startup, and desktop differ A first look only Possible, but mistakes affect your real system

Notice the WSL 2 isolation cell. WSL 2 has its own kernel, but Microsoft built it to be close to Windows: C: appears at /mnt/c, and Windows programs start from the Linux prompt. That closeness makes WSL good for daily work on Windows, and it is why WSL is not a sealed lab.

In the snapshots row, wsl --export saves the whole distribution as one file that you can import again. It works as a backup, not as a snapshot that you restore in place.

This course is built and tested on Ubuntu 24.04 LTS Desktop in a VM made with Oracle VirtualBox 7. A full VM is the reference environment for three reasons, which together make it safe to break:

  • Isolation. The guest has its own kernel and its own disk. A command that damages the guest does not reach your files on the host.
  • Snapshots. Before a risky exercise, you take a snapshot. When you restore it, the VirtualBox manual says, “the current state of the machine is lost”, which here is the point: the mistake is gone, and the system is as it was.
  • A real kernel and systemd. The guest runs Ubuntu’s own kernel and starts with systemd, the init program from lesson B01.3, as an installed Ubuntu does, so lessons about services, startup, and the desktop match what you see.

VirtualBox is free and runs on Windows, macOS, and Linux hosts, so one set of steps serves most learners. Lesson B02.3 creates the VM and notes where the hosts differ, including Macs with Apple silicon.

These mistakes produce no error message. You notice them by what is missing or what changed.

A command in WSL changed Windows files. You ran a command on a path under /mnt/c, and files changed in Windows. In WSL, /mnt/c is your Windows C: drive, not a copy.

Expecting WSL 1 to behave like Linux. A program that works in WSL 2 fails in WSL 1. WSL 1 has no Linux kernel and does not support every system call. The Windows command wsl --list --verbose shows which version each distribution uses.

Microsoft’s WSL documentation lists VirtualBox together with WSL 2 as “unsupported”, because of remaining challenges, and advises using the current versions of both if you run them together. The diagram shows why they meet: with WSL 2 on, Hyper-V runs under Windows, and VirtualBox is a program on that Windows. If you already use WSL 2, lesson B02.3 shows what you see in VirtualBox and what you can do.

Security work often means running something you do not trust yet, such as a sample from an exercise that is meant to be harmful. Suppose it encrypts every file it can reach. In a full VM with no shared folder, that is only the guest’s virtual disk, and restoring the snapshot you took first removes the damage. The VM boundary is strong, but VirtualBox is software too and receives security fixes, so keep it updated.

Goal: Choose a setup for each situation and give a reason from isolation, persistence, hardware access, or snapshots.

  1. A friend wants to know whether the Wi-Fi adapter in their laptop works with Ubuntu, before installing anything.
  2. You want to follow an exercise that changes how the system starts. If you get it wrong, the system may no longer start.
  3. A developer on Windows wants Linux tools every day, on files that Windows programs also open.
  4. An old laptop will be used only for Linux, as a small home server.

Expected: A setup and one reason for each situation.

Hint

For 1, which setups use the real hardware without installing? For 2, how do you get back to a working system? For 3, does closeness to Windows help here? For 4, is a host OS needed at all?

Solution
  1. Live USB session. It runs on the real hardware, including the Wi-Fi adapter, and changes nothing on the laptop. A VM sees only a virtual network device.
  2. Full VM, with a snapshot first. If the system no longer starts, restore the snapshot. On bare metal, the same mistake could leave the computer unable to start.
  3. WSL 2. Windows drives appear in Linux. For a lab, that closeness is a weakness; here, it is the purpose.
  4. Bare metal. Linux is the only system on the laptop, so no host OS is needed, and Linux gets the real hardware.
  • Bare metal runs Linux on the hardware; a live session runs from a USB stick and keeps nothing by default; a full VM runs a guest OS with its own kernel; WSL 2 runs Microsoft’s Linux kernel in a managed VM on Hyper-V, beside Windows; WSL 1 has no Linux kernel.
  • Compare setups by isolation, persistence, hardware access, and snapshots.
  • WSL 2 is close to Windows on purpose: your Windows drives appear at /mnt/c. A live session can open the disks inside the computer.
  • This course uses Ubuntu 24.04 LTS Desktop in VirtualBox 7: a full VM is isolated, has snapshots, and runs a real Ubuntu kernel and systemd.

Next, in Downloading and verifying installation media (B02.2), you download Ubuntu and check that the file is the one Ubuntu published.

All sources were checked on 1 November 2026, except the Hyper-V architecture page, checked on 2 November 2026.