logo
search
list

Table of Content

What You Need
Step 1: Download VirtualBox and the Ubuntu ISO
Step 2: Enable Hardware Virtualization on the Host
Step 3: Create a New Virtual Machine
Step 4: Install Ubuntu Inside the VM
Step 5: Install Guest Additions (Better Display, Clipboard, Shared Folders)
Step 6: Shared Folders (Optional but Useful)
Power Off vs Save State
Fix Common VirtualBox Linux Install Problems
After Ubuntu Runs in VirtualBox: Office Files Inside the Guest
FAQ

How to Install Linux on VirtualBox (Ubuntu Guide)

Posted by Algirdas Jasaitis

calendar

2026-07-27

views

869

likes

4

To install Linux on VirtualBox, install Oracle VM VirtualBox on your host PC, download an official Ubuntu Desktop ISO, create a new VM, attach that ISO as the virtual DVD, then finish the Ubuntu installer inside the VM. You do not need a physical USB stick—the ISO is mounted as virtual install media.

Critical prerequisites: leave enough RAM/CPU for the host OS, enable hardware virtualization (Intel VT-x / AMD-V) in firmware if 64-bit Ubuntu is greyed out or the VM blacks out, and back up important host files before allocating a large virtual disk. Success means you can log into Ubuntu in the VirtualBox window, resize the display, and run sudo apt update.

If you already know your blocker, jump to: enable virtualization, black screen after Guest Additions, shared folder permissions, or attach the ISO correctly.

Concept illustration of installing Ubuntu Linux inside a VirtualBox virtual machine
Create a VirtualBox VM, attach the Ubuntu ISO as virtual install media, finish setup, then add Guest Additions.

For the full PC install overview with Ubuntu, start with how to install Linux on a PC.

What You Need

  • A Windows, macOS, or Linux host with free disk space
  • Internet to download VirtualBox and the Ubuntu ISO
  • Rough resource budget (Ubuntu’s VirtualBox tutorial guidance):
    • RAM: about 8 GB for good performance (4 GB still usable)
    • CPUs: up to about 4 vCPUs if your host can spare them (stay in VirtualBox’s “green” range)
    • Disk: about 25 GB minimum for Ubuntu Desktop

VirtualBox runs the guest; Ubuntu (or another distro) is what you install inside the VM.

Step 1: Download VirtualBox and the Ubuntu ISO

  1. Download VirtualBox for your host from the official VirtualBox downloads page.
  2. Install VirtualBox using the vendor instructions for Windows, macOS, or your Linux distro.
  3. Download Ubuntu Desktop from the official Ubuntu Desktop download page.
  4. Save the .iso to a memorable folder on the host (for example Downloads). Do not rename it oddly or store it only on a flaky network share.

Optional: also keep the matching Guest Additions ISO that VirtualBox provides (Ubuntu’s tutorial recommends enabling Guest Additions during VM creation when offered).

Step 2: Enable Hardware Virtualization on the Host

Ask Ubuntu black-screen / “only 32-bit” reports often trace back to disabled CPU virtualization.

  1. Reboot the host into firmware setup (common keys: Del, F2, F10, Esc—OEM specific).
  2. Enable Intel VT-x, AMD-V, SVM, or similarly named virtualization options.
  3. Save, reboot, then reopen VirtualBox.

On Windows hosts, also avoid conflicting Hyper-V / Virtual Machine Platform setups if VirtualBox cannot start 64-bit guests—fix host virtualization conflicts before blaming the Ubuntu ISO.

Step 3: Create a New Virtual Machine

Canonical’s current VirtualBox 7 tutorial flow:

  1. Open VirtualBox → click New.
  2. Set a Name that includes “Ubuntu” so Type/Version auto-detect when possible.
  3. Choose a Machine Folder with enough free space.
  4. Select the downloaded ISO Image.
  5. Decide install style:
    • Unattended Guest OS Install (VirtualBox 7+): fill username/password/hostname now. Change defaults—Ubuntu’s tutorial warns default vboxuser/changeme can create a weak/no-sudo setup if left unchanged. Hostname must have no spaces.
    • Manual install: skip unattended options and use the normal Ubuntu installer on first boot.
  6. Check Guest Additions when the wizard offers it (recommended for resolution and integration).
  7. Assign memory and CPUs (stay within green/safe host limits).
  8. Create a virtual hard disk (~25 GB+), usually dynamically allocated unless you want full preallocation for speed.
  9. Review the summary → Finish.

Classic “attach ISO” method (Ask Ubuntu favorite)

If you already created a blank VM:

  1. Select the VM → SettingsStorage.
  2. Under the optical controller, add/choose a disc → Choose a disk file → pick the Ubuntu .iso.
  3. Confirm the optical drive is in the boot order (System → Motherboard/Boot Order as needed).
  4. Start the VM.

You only need to mount the ISO in the VM—Ask Ubuntu’s top ISO answer stresses not overcomplicating this with extra host ISO tools.

Step 4: Install Ubuntu Inside the VM

  1. Select the VM → Start.
  2. If using unattended install, let it proceed without interrupting early “Try or Install” prompts so automation can continue.
  3. If installing manually:
    • Choose language/keyboard/network
    • Prefer erase virtual disk (safe—this only wipes the virtual disk, not your host, unless you attached a real physical disk by mistake)
    • Create your user account
    • Finish and reboot
  4. When asked to remove install media, ensure the ISO is no longer required; VirtualBox usually disconnects it after install, or you can remove it under Devices → Optical Drives.

After login, update:

sudo apt update && sudo apt upgrade -y
sudo snap refresh

Early resolution may stay low (for example 800×600) until Guest Additions finish installing—Ubuntu’s tutorial calls this expected.

Step 5: Install Guest Additions (Better Display, Clipboard, Shared Folders)

Guest Additions improve display resizing, mouse integration, clipboard, and shared folders (VirtualBox Manual: Guest Additions).

Option A: Insert the Guest Additions CD (matches your VirtualBox version)

  1. In the running Ubuntu guest, install build tools:
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
  1. VirtualBox menu → DevicesInsert Guest Additions CD image.
  2. Run the installer from the mounted CD (path version varies), for example:
cd /media/$USER/VBox_GAs_*
sudo ./VBoxLinuxAdditions.run
  1. Reboot the guest.

Option B: Ubuntu package path

Some guests install virtualbox-guest-utils / related packages from Ubuntu repos. That can work, but version skew with the host VirtualBox release is a common Ask Ubuntu pain—prefer the CD matching your host VirtualBox when features break.

If the screen goes black after Guest Additions, boot recovery/old kernel as needed, remove mismatched additions, and reinstall the CD build that matches the host.

Step 6: Shared Folders (Optional but Useful)

  1. Power off or leave running per your VirtualBox version’s shared-folder rules; usually configure under VM SettingsShared Folders or DevicesShared Folders.
  2. Add a host folder, set a share name, enable Auto-mount / Make Permanent as needed.
  3. In Ubuntu, grant access:
sudo usermod -aG vboxsf $USER
  1. Log out/in or reboot. Auto-mounted shares often appear under /media/sf_.

Ask Ubuntu’s standard fix for “can’t access shared folder” is exactly the vboxsf group membership.

Power Off vs Save State

When closing the VM window:

  • Save state freezes the session like sleep (fast resume)
  • Send shutdown signal / Power off does a cleaner OS shutdown

Use shutdown before changing CPU/RAM settings.

Fix Common VirtualBox Linux Install Problems

64-bit Ubuntu not available / install fails oddly

Enable VT-x/AMD-V in host firmware. Confirm you created a 64-bit Ubuntu VM type.

Black screen during or after install

Check virtualization enabled; try increasing video memory slightly; boot Ubuntu recovery; if Guest Additions caused it, remove/reinstall matching additions.

ISO won’t boot / stuck on boot logo

Re-download the ISO, remount under Storage, ensure optical drive is attached and bootable. Try a different VirtualBox version only after verifying the ISO checksum.

Guest Additions features don’t work

Install kernel headers/DKMS first, use the Additions CD for your exact VirtualBox build, reboot, and confirm modules loaded.

Shared folder permission denied

sudo usermod -aG vboxsf $USER then reboot.

Host runs out of memory

Lower VM RAM/CPU; close host apps; avoid assigning most of the host’s cores/RAM to the guest.

After Ubuntu Runs in VirtualBox: Office Files Inside the Guest

A VirtualBox Ubuntu guest quickly becomes more than a test box. Many people end up writing lab notes, training docs, or spreadsheet-style checklists inside the VM itself.

WPS Office for Linux adds a familiar Writer/Spreadsheet/Presentation layer inside that guest so your files still look right when you move them back to the host.

WPS Office Writer on a Linux desktop editing an incident report DOCX with a familiar ribbon toolbar
WPS Writer on Linux: turn setup notes, terminal findings, and troubleshooting steps into a DOCX or PDF that teammates can open easily.
What you need nextWhat WPS gives you
Create Office-compatible files inside the VMStrong .docx / .xlsx / .pptx layout fidelity when files move between Linux, Windows, and macOS
One place for notes, sheets, slides, and PDFsFree core suite: Writer, Spreadsheet, Presentation, plus PDF view/edit/convert tools
A familiar desktop UI for switchersRibbon-style apps with a lighter footprint than many heavy suites
A trusted install pathOfficial DEB (Ubuntu/Debian/Mint) and RPM packages from the vendor

Download the package from the official WPS Office for Linux download page, install it with sudo apt install ./wps-office_VERSION_amd64.deb, and use a shared folder to move the resulting DOCX, XLSX, or PDF files between host and guest safely.

FAQ

How do I install Linux on VirtualBox quickly?
Install VirtualBox, download Ubuntu ISO, create a VM with that ISO attached, finish the Ubuntu installer, then add Guest Additions.

Do I need a USB stick?
No. VirtualBox installs from the ISO file mounted as a virtual DVD.

How much RAM should I give Ubuntu?
Ubuntu’s VirtualBox tutorial suggests about 8 GB when possible; 4 GB can still work for lighter use. Leave RAM for the host.

What are Guest Additions?
Oracle’s guest drivers/tools for better display, mouse, clipboard, and shared folders.

Is VirtualBox free?
The VirtualBox base packages are freely available under GPLv3 from Oracle’s VirtualBox downloads. Extension Pack licensing can differ—read current Oracle terms if you need it.

Can I install other Linux distros the same way?
Yes—same pattern: create VM → attach distro ISO → install. Ubuntu’s tutorial notes the flow works for Ubuntu flavors too.

Algirdas Jasaitis

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.