How to Install Linux in VirtualBox (2024)

By Abubakar Mohammed

Updated

Want to try out Linux but don't want to commit to a full install? Use VirtualBox.

How to Install Linux in VirtualBox (1)

Quick Links

  • What Is VirtualBox?
  • What Do You Need to Run a Linux Virtual Machine?
  • Installing VirtualBox on Windows, Linux, and Mac
  • Installing Linux in VirtualBox
  • Installing VirtualBox Extension Pack

Key Takeaways

  • VirtualBox allows you to install and run different operating systems inside your existing OS using virtual machines(VM). It's like a computer within a computer.
  • Make sure your computer has enough resources to handle the VM and your regular OS for a smooth experience. The recommended specs include 8GB RAM, 25GB storage for each VM, and a processor with at least four cores.
  • To create a VM, download the ISO for the operating system you want, open Virtual Box, click "New," then follow the on-screen prompts.

If you want to try out a Linux distribution, you may want to do it in a virtual machine (VM) before dual-booting or completely overwriting your system. Choose a distribution and let's run it in a VM using VirtualBox.

What Is VirtualBox?

VirtualBox is a program that allows you to install and run various operating systems (OS) inside your existing operating system using the concept of virtual machines. As the name suggests, a VM is a virtual computer that can run programs and operating systems. Think of it as a computer within a computer.

What Do You Need to Run a Linux Virtual Machine?

Before we begin, note that your computer needs to have enough system resources to handle both the VM and your regular operating system to smoothly create and run a virtual machine. Otherwise, you're likely to have a slow and problematic experience. Here's what we recommend as the minimum specs for smoothly running a VM:

  • 8GB RAM
  • 25GB of available storage for each VM
  • A processor with at least four cores

Installing VirtualBox on Windows, Linux, and Mac

Installing VirtualBox itself on Windows, Linux, and macOS is pretty easy, though installing an OS in VirtualBox will require a bit of time, but fret not! We're going to go over each step. While we install and set up VirtualBox.

To install VirtualBox on Windows, head over to the official VirtualBox downloads page and click on "Windows Hosts" to download the installer for Windows.

How to Install Linux in VirtualBox (2)

Double-click on the installer file to launch it and follow the steps to install VirtualBox on Windows. You know, the typical Windows way.

How to Install Linux in VirtualBox (3)

To install VirtualBox on a Mac, you need to go to the downloads page and click on "OS X hosts." After the DMG file is downloaded, open it and drag its contents into your Applications folder.

Installing VirtualBox on various Linux distributions (distros) is also pretty easy. You need to go to the Linux Downloads page and download the installer package for your distribution.

How to Install Linux in VirtualBox (4)

Ubuntu and Debian use DEB files, whereas Fedora, OpenSUSE, RedHat Enterprise Linux, and CentOS use RPM files. Download the relevant package and double-click on it to install VirtualBox. If you're stuck, learn how to install a DEB file and an RPM file in Linux.

Installing Linux in VirtualBox

The steps for installing Linux in VirtualBox are pretty much the same on Windows, Linux, and macOS. If you haven't already, choose a distro and start downloading the ISO so that it's ready by the time we reach the step where we load it into the VM.

Launch VirtualBox from the app menu.

How to Install Linux in VirtualBox (5)

We're going to use "Guided Installation" for the duration of this article. If you switch to expert mode all of these settings appear on one page in a series of expandable menus instead.

Click on "New."

How to Install Linux in VirtualBox (6)

Enter a name for your Virtual Machine, choose a location you want to save it in, and the ISO of the distro you're going to be using. Det the version to the distro you're using. If your distro isn't listed, choose the closest distro, or the one it's based on. For example, choose Ubuntu for an Ubuntu-based distro like Pop!_OS or Linux Mint. When you pick an ISO image VirtualBox will attempt to guess and pick the closest operating system.

We'd recommend against ticking the "Skip Unattended Installation" option most of the time. If it works, you don't have to fuss with setting up a user. If it doesn't work, you'll just have to pick a username and password once you start your VM.

When you're ready, click "Next."

How to Install Linux in VirtualBox (7)

Change the password you'll use for the Virtual Machine's user account. Keep in mind that this user will be in the sudoer group by default. If the VM is going to be used for an internet-facing service, make sure to pick a strong password. Once you're done, click "Next."

Your hostname cannot have spaces in it. You will not be able to proceed unless you pick a name with no spaces.

How to Install Linux in VirtualBox (8)

Allocate the RAM using the slider or enter the value in the text box. If you're installing Ubuntu or Ubuntu-based distros, we'd recommend selecting at least 4GB of RAM. You can also pick how many virtual cores your VM will have. We opted for 8 GB of RAM with 4 cores. If your PC doesn't have a ton of extra resources 1 core with 4GB of RAM will probably be fine. Then, click "Next."

How to Install Linux in VirtualBox (9)

On this next screen you can adjust the slider to determine how large the VM's hard drive will be. The default suggestion for us was 25 gigs, and we'll stick with that. If you need more feel free to adjust it.

How to Install Linux in VirtualBox (10)

You'll see a neat little summary showing you what you've selected. Be sure to at least skim this and make sure everything is correct, though you can adjust most of this later if you need to.

How to Install Linux in VirtualBox (11)

Your Virtual Machine will boot and you'll be presented with whatever options you normally would while installing the operating system you chose.

How to Install Linux in VirtualBox (12)

Installing VirtualBox Extension Pack

Want extra features and control over your VM? Installing the VirtualBox Extension Pack adds support for USB, webcam, and more. Here's how to download and install it in VirtualBox.

Download the VirtualBox Extension Pack from the downloads page.

How to Install Linux in VirtualBox (13)

Open VirtualBox and click on the menu icon next to "Tools," then select "Extensions."

How to Install Linux in VirtualBox (14)

Click on the "Install" button near the top.

How to Install Linux in VirtualBox (15)

Select VirtualBox Extension Pack from the download location and click on "open."

How to Install Linux in VirtualBox (16)

Finally, click on "Install" and accept the Terms and Conditions.

How to Install Linux in VirtualBox (17)

Now that your Linux virtual machine is up and running, here are some of the VirtualBox tips and tricks you need to know.

How to Install Linux in VirtualBox (2024)
Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 5980

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.