Linux module
Getting started
Ubuntu VM on Windows (VirtualBox)
Create a real Ubuntu virtual machine on Windows with VirtualBox. Use this if WSL is blocked or you want a full Linux desktop.
beginner75 minRun on your machine
What you will be able to do
- Install VirtualBox and download an Ubuntu Desktop LTS ISO
- Create a VM that will not touch your Windows disk
- Finish the Ubuntu installer and open a terminal
- Run the same ready checklist as Getting Started
This on-ramp is Windows-only. macOS and Linux users should stay on Getting Started.
If WSL already works, you do not need a VM. Use WSL — it is lighter and closer to how many data teams work on a Windows laptop. Use this lesson when:
- IT blocks WSL, or
wsl --installfails - You want a full Ubuntu desktop window, not only a terminal
- You prefer a machine you can snapshot, break, and roll back
What you need
| Piece | Minimum | Comfortable |
|---|---|---|
| Windows | 10 or 11, 64-bit | Windows 11 |
| RAM | 8 GB on the PC (give the VM 2 GB) | 16 GB (give the VM 4 GB) |
| Disk | ~25 GB free | 40 GB free |
| Rights | Permission to install programs | Administrator account |
Most Windows PCs are Intel or AMD. If you have a Snapdragon / Windows-on-ARM laptop, pick the ARM 64-bit Ubuntu ISO later, not the Intel/AMD one.
1. Check that virtualization is on
- Right-click the taskbar → Task Manager → Performance → CPU.
- Look for Virtualization. It should say Enabled.
If it says Disabled, reboot into BIOS/UEFI (often F2, Del, or Esc at power-on) and enable Intel VT-x, AMD-V, or SVM. Save and boot Windows again.
Without this, VirtualBox will refuse a 64-bit Ubuntu machine, or the option will be greyed out.
2. Download VirtualBox
- In your Windows browser open https://www.virtualbox.org/wiki/Downloads.
- Under VirtualBox platform packages, choose Windows hosts.
- Run the installer. Accept the defaults. If Windows asks about network adapters, allow them — that is how the VM gets internet.
- Finish and open Oracle VirtualBox.
You do not need the Extension Pack for this lesson.
3. Download Ubuntu Desktop LTS
- Open https://ubuntu.com/download/desktop.
- Download Ubuntu 26.04 LTS for Intel or AMD 64-bit (about 6 GB). Wait until the file is fully downloaded. It should end in
.iso. - Remember the folder (usually Downloads).
LTS means long-term support. Do not pick a random “daily build.” If the site shows a newer LTS than 26.04, take that current LTS instead.
4. Create the virtual machine
In VirtualBox:
- Click New.
- Name:
dcubes-ubuntu(any name is fine; this one is easy to find tomorrow). - ISO Image: click the drop-down → Other… → select the Ubuntu
.isoyou downloaded. - Type / Version should become Linux / Ubuntu (64-bit) by itself. If you see only 32-bit, stop and fix virtualization (step 1).
- Unattended install: turn it off if VirtualBox offers a checkbox like “Proceed with Unattended Installation.” You will click through Ubuntu yourself so you see what is happening.
- Hardware:
- Memory: 4096 MB if the PC has 16 GB or more; otherwise 2048 MB
- CPUs: 2 if you have 4+ cores; otherwise 1
- Hard disk: 25 GB, dynamically allocated. Dynamic means the file on Windows starts small and grows. It does not grab 25 GB on day one.
Click Finish. You now have an empty VM. Windows itself is unchanged.
5. One setting before the first boot
Select dcubes-ubuntu → Settings:
- System → Motherboard: leave EFI as VirtualBox chose it when you picked the ISO.
- Display → Screen: video memory 128 MB. Leave 3D acceleration off for now (it is a common black-screen cause).
- Network: NAT (default). The VM can reach the internet. You do not need a second network adapter.
OK, then Start.
6. Install Ubuntu onto the virtual disk
The VM window is a separate computer. The installer will talk about “erasing the disk.” That disk is the 25 GB virtual file, not your Windows C: drive.
Rough installer path (labels move slightly between Ubuntu versions):
- Choose language and keyboard → Install Ubuntu.
- Interactive installation (not the automated “help me out” path if you want to see each screen).
- Normal installation is enough. You do not need extra third-party codecs to start.
- Disk: Erase disk and install Ubuntu — again, this is the VM disk.
- Time zone, then your name, computer name, username (lowercase, no spaces), and password. The password will not echo. Type it twice.
- Sit through the copy. When it says Restart now, press Enter. If it asks you to remove the installation medium, press Enter — VirtualBox will let go of the ISO.
Log in with the user you created. You should see an Ubuntu desktop.
Host key: if the mouse is “stuck” inside the VM, press the Right Ctrl key (VirtualBox’s Host key) to give the mouse back to Windows.
7. Open a terminal in the VM
Inside Ubuntu:
- Press Ctrl + Alt + T, or
- Click Activities (top-left), type
Terminal, press Enter.
You should see a prompt like:
sam@dcubes-ubuntu:~$
Update packages once (it will ask for the password you set in the installer):
sudo apt update
sudo apt upgrade -y
8. Ready checklist (same as Getting Started)
Run these inside the Ubuntu terminal, one at a time:
whoami
pwd
echo hello
uname -a
Then create the lab folder used in every later lesson:
mkdir -p ~/dcubes/linux-lab
cd ~/dcubes/linux-lab
pwd
Done when: pwd ends in dcubes/linux-lab and uname -a mentions Linux.
From here the rest of the module is identical to WSL. Continue with Why Linux for Data Engineering and AI. You can also skim Getting Started from Read the prompt onward.
9. Optional: clipboard and a bigger window (Guest Additions)
Copy-paste from this website (Windows browser) into the VM terminal is painful until Guest Additions are installed.
- In the VM window menu: Devices → Insert Guest Additions CD image.
- In Ubuntu, if a CD folder opens, run the installer it offers.
- If nothing opens, in the Ubuntu terminal:
sudo apt update
sudo apt install -y build-essential dkms linux-headers-generic
Then find the CD (often under /media/YOURUSER/) and run VBoxLinuxAdditions.run with sudo. Reboot the VM: Machine → Reset, or:
sudo reboot
- After reboot: Devices → Shared Clipboard → Bidirectional. View → Auto-resize Guest Display if you want the Ubuntu desktop to fill the window.
If Guest Additions fail, skip them. You can still type every command by hand.
10. How to come back tomorrow
- Open VirtualBox on Windows.
- Select dcubes-ubuntu → Start.
- Open Terminal in Ubuntu.
cd ~/dcubes/linux-lab.
Do not click New again. That would create a second empty machine.
To stop: Ubuntu Power Off, or VirtualBox ACPI Shutdown. Save the machine state is also fine — it freezes the VM and resumes later.
If something failed
Only 32-bit OS types in VirtualBox. Virtualization is off, or the CPU is old. Fix BIOS first.
VT-x is not available / Hyper-V errors. Windows Features may have Hyper-V or Memory Integrity (Core isolation) blocking VirtualBox. WSL2 also uses Hyper-V. VirtualBox 7 can often run with Hyper-V, but it is slower. If you already use WSL successfully, prefer that on-ramp instead of fighting both.
Black screen after install. Settings → Display: 128 MB video memory, 3D off. Try Machine → Reset.
No internet in the VM. Settings → Network → Adapter 1 attached to NAT. Then in Ubuntu:
ping -c 3 ubuntu.com
Installer wants to wipe a huge disk. You are probably not in the VM. Abort. Only continue if the disk is about 25 GB.
ISO is an .xz or a tiny file. The download did not finish. Download the Desktop ISO again from ubuntu.com and wait until it matches the size on the download page.
What is next
Why Linux, then the rest of the Linux module, always in the Ubuntu VM terminal.