Need to install Linux in a virtual machine? Whether you're trying it for the first time or want to run Linux without dual booting, a virtual machine (VM) is a smart option.

But what is the best Linux distro for a virtual machine? Should you use VirtualBox or VMware? Here are seven of the best Linux distros to run in your VM.

What Should You Use to Run Your Linux VM?

But first, how will you run your Linux virtual machine? Several VM applications are available, such as VMware and QEMU. There's also Qtemu, a version of QEMU with a mouse driven user interface rather than forcing command line interaction.

But getting started with virtualization is simplest with VirtualBox. It works like this:

  1. Install and launch VirtualBox
  2. Click New
  3. Enter the name of the OS you're installing
  4. Select the virtual machine type and version
  5. Configure the VM's CPU, storage, and RAM
  6. Select your chosen Linux installation image
  7. Install in your virtual machine

This is, of course, a summary of the actions. Check our VirtualBox user guide for full details on using this amazing software.

You could be using macOS, Windows, or even a different Linux distro as your desktop operating system, it doesn't matter. With a virtual machine, any other operating system can be installed on top.

Once you're ready it's time to choose a Linux distro to run in your virtual machine. We've picked the most interesting, lightweight Linux versions for you to install.

1. Linux Mint

Currently up to version 20, Linux Mint has several alternative versions available, each boasting different desktop environments. Installing Linux Mint in a VM is a good idea, as the default desktop doesn't require 3D acceleration. This makes it a good, lightweight Linux distro for your VM.

Your virtual machine will almost certainly be running like a lower-spec version of your computer. So, with fewer resources to go around, the low-spec support of Linux Mint will prove advantageous. You'll have even better results with a different desktop environment. Fancy swapping Cinnamon for MATE or Xfce? Performance will improve even more, while running the most popular desktop Linux operating system around!

2. Lubuntu

This lightweight version of Ubuntu has been around for several years, and its modest footprint makes it ideal for running in a virtual machine. Once set up, you'll get an idea of how it might perform when installed as the default operating system.

And if Lubuntu itself doesn't prove lightweight enough for you, why not try LXLE, the Lubuntu Extra Life Extension? Even lighter than Lubuntu, LXLE is ideal for running as a virtual machine on low-spec but virtualization-capable hardware.

Naturally, that means that it is also ideal for running on old hardware. We tried it on an old Compaq netbook, with great results!

3. Raspberry Pi OS

The Raspberry Pi is arguably the most accessible Linux device, with some models available for as little as $10. If you're interested in getting started with the compact computer, you might try the Raspberry Pi OS on your PC.

Simply download the disk image for the full desktop version of the operating system. This is intended for x86 and x64 systems, rather than ARM (as per the actual Raspberry Pi. Not keen on installing a new operating system?

Don't worry---there's a version of the Raspberry Pi's OS available for VirtualBox and VMware from OSBoxes. Simply download the virtual machine file (in VDI for VirtualBox, VMDK for VMware) and run it on your PC.

4. Fedora

Run Fedora in a virtual machine

A popular Linux operating system, Fedora is a distro with a focus on open source software. Curiously, it has a reputation of being difficult to use, but this really isn't warranted.

While poor performance can be resolved with a change to the desktop environment, Fedora's focus on open source is significant. Despite its origins, Linux operating systems typically flip flop between open source software and a few proprietary apps and drivers.

Fedora resists this, offering only FOSS apps and drivers, making this a distribution everyone should try.

And where better to try a new operating system than in a virtual machine?

5. Manjaro Linux

A lightweight Linux operating system ideal for a multitude of purposes, Manjaro is based on Arch Linux and optimized for 32-bit and 64-bit systems.

While Arch is a bit more difficult to set up, Manjaro is simpler. But note that it isn't quite the same as other Linux distros. There is less structure to the experience, which means you're free to configure your operating system as you see fit.

You get to choose the desktop environment, which services to install, and which applications to add. Some consider Manjaro and Arch to be the closest to "true" Linux, a  free, open source experience.

6. elementary OS

elementary OS comes with a suite of default apps

Coupled with the stunning Pantheon desktop environment, elementary OS isn't particularly lightweight. Like many distros it is based on Ubuntu. So what makes it worth installing on a virtual machine?

Well, this is a distribution that demonstrates the extent of just what is possible with Linux. Along with the stunning desktop, elementary OS has its own apps, is easy to use, and owes much to macOS. With few distractions and perfect for productivity, elementary OS is ideal for installing on VirtualBox or VMware.

Need more convincing? Here's why you should install elementary OS.

7. Ubuntu Server

Install Ubuntu Server in your VM

So far, we've looked at desktop distros, but if your Linux interest is more server-based, why not consider Ubuntu Server. If you haven't used a server before, installing Ubuntu Server in your VM is a great way to gain familiarity.

After all, you wouldn't want to experiment with a genuine server, would you?

With the server's configuration complete, you can transfer this experience to a physical server, and ready it for production.

Confused about the difference between desktop and server operating systems? Check our guide to the differences between Ubuntu Desktop and Ubuntu Server.

Install a Linux Distro in Your Virtual Machine Today

By now you should have a good idea of which Linux distro is best for your virtual machine. It doesn't matter if you're using VMware or VirtualBox---both are perfect for running Linux. Which one will you install? We've looked at:

  • Linux Mint
  • Lubuntu
  • Raspberry Pi OS
  • Fedora
  • Arch Linux
  • Elementary OS
  • Ubuntu Server

Meanwhile, if you're new to Linux, consider installing RoboLinux in your VM to ease the transition from Windows.