Linux Virtualization Made Easy with GNOME Boxes (Beginner’s Guide)

If you’re looking for a simple, easy to use virtualization solution for your Linux desktop – GNOME’s “Boxes” app might just be what you’re looking for! In this video, Jay will give you an overview of GNOME Boxes and how to use it.

Thanks to System76 for sponsoring this video!*
Check them out and get yourself a computer that was born to run Linux!

YouTube player

Intro

Hello again everyone, and welcome back!

In this article, I’m going to give you an overview of GNOME Boxes, a great virtualization solution that’s exclusive to Linux, and gives you the ability to spin up virtual machines. It has a great interface, it’s simple to use, and you’ll see it in action in today’s .

What is GNOME Boxes?

First, let’s go over a bit about what GNOME Boxes is, and why you might want to consider using it.

Like I mentioned during the intro, Boxes is a virtual machine solution, similar to Virtualbox.

Boxes is very easy to use, with it taking just a few clicks to do pretty much anything. You can use it to quickly spin up a Linux box or two, and it has great features such as snapshots, USB redirection, folder sharing, and more.

Something I suppose I should get out of the way is that Virtualbox is a popular piece of software when it comes to virtualizaiton, and it’s also available for Linux. So you might be wondering, why use GNOME Boxes instead of Virtualbox?

Well, the truth is, both Boxes and VirtualBox are great solutions and I think either choice would serve you well.

That said, one benefit that GNOME Boxes has is that the interface is much cleaner than Virtualbox, and it integrates really well with the GNOME desktop. It feels like a much more native solution when compared to Virtualbox, because, well, that’s what it is. A native virtualization solution for Linux.

Another benefit has to do with licensing. Virtualbox has a more restrictive license when compared to GNOME Boxes. To be fair, most people ignore the license anyway and just use Virtualbox without even glancing at it. VirtualBox is open source, just like GNOME Boxes is, but the problem comes with the extension pack that’s required for enabling all of its features. It’s supposed to be used for no-commercial reasons, which means you’re not technically supposed to use it at work without paying for it. With GNOME Boxes, there’s no such restriction. You simply download and use it. That’s it.

On the other hand, a major downside of GNOME Boxes is that it’s only available for Linux. This means you’re out of luck if you want to use the same virtualization solution across multiple host operating systems.

On my end, I use Linux primarily so it doesn’t bother me at all that Boxes isn’t available for other platforms. In fact, it’s my preferred desktop virtualization solution due to how well it integrates with Linux, and to top it off Boxes is a first-class citizen if you use Fedora. I even noticed that copying and pasting text from my VM to my host OS worked without any configuration. For the most part, Boxes just works.

Anyway, I think it’s time to get Boxes installed so we can check it out. And that’s what we’ll do in the next section.

Installation

First, let’s talk about setting it up.

The first thing you’ll need to do is make sure virtualization is enabled for your hardware. This isn’t a Linux-specific thing, most computers have a setup screen that’s available when you first start it, that provides an interface to hardware-specific settings. Virtualization support is built into most CPU’s nowadays, but sometimes you’ll have to access your computer’s setup screen to enable it. The verbiage varies, but you’re basically looking for a virtualization setting. If you see it, turn it on.

Next, we can take a look at how to install GNOME Boxes. The process is fairly straight-forward, and for some of you it’ll be easier than others because some distributions include Boxes by default, so it might already be installed. For example, Fedora ships GNOME Boxes as part of its default software stack, so if that’s your distro of choice – then you’re good to go. To confirm that it’s installed, we can simply look to see if it’s listed among our other installed applications.

If Boxes isn’t already installed, it’s pretty easy to get. The quickest method for most of you will be to open your distribution’s software manager, such as GNOME Software, the COSMIC app store, or whatever your distribution chooses to call theirs.

Once there, you can search for Boxes, and it should be on the list. In some cases, there’s going to be two different versions of Boxes offered, a package from your distribution’s repositories or possibly the flatpak version. Either method is fine, you can simply click the install button and that’s about it.

For those of you that do have a Flatpak option, you might want to consider that route. Some distributions lock their Boxes package to an older verison, and typically the Flatpak version will be the most up to date. I’ll leave that up to you.

I should also take the time to mention my video that explains what Flatpak is, and why you might want to consider using it. Not all distribution’s have Flatpak available by default, but in that video I’ll show you how to enable the format. Once you do that, you can install the Flatpak version of Boxes even if your distribution doesn’t already offer it.

For those of you that prefer to install apps using a terminal, I’ll overlay some commands on the screen for some of the more popular distributions. The package shouldn’t take much time to install, and once it’s done you should see Boxes among your other installed applications.

Setting up Virtual Machines

Now that we have GNOME Boxes available, let’s see it in action.

When you first open it up, Boxes will look a little empty. And that’s just because we haven’t set up a virtual machine yet, so let’s do it.

To create a virtual machine, we’ll click the plus icon at the top left corner. Once we do that, we’ll be able to choose whether we want Boxes to download an operating system for us, or if we’d prefer to supply an ISO file of our own. Unless you’re setting up a distribution that’s not on the list, the “Download OS” option will be the easiest.

There’s quite a few distributions on this list, but I’m going to keep it simple and set up Fedora 41 for our first VM.

Once we choose our desired distribution, we’ll have a chance to customize it a bit, in terms of the resources we’re comfortable with the VM having access to. Depending on how much CPU and RAM you think you can spare, you can customize this accordingly. I’ll just accept the defaults.

Immediately, the VM will start up. At this point, the distribution you chose will either need you to finish the installation, or it might get set up automatically if your distro supports auto install. In this case, Fedora will need us to navigate the installation manually.

Most distributions nowadays start in live mode, and will have an installer that will either start automatically or be available through an icon. This gives you a chance to test the distro out before installing it.

Keyboard Shortcuts

Before we continue with setting up our VM, I wanted to go over a few useful keyboard shortcuts. I figured it would be more useful to show you these now, rather than later.

First, to create a new virtual machine, hold CTRL and press N.

To exit out of a VM and return to the main screen, you can press ALT+Left.

Another useful shortcut to know is CTRL+ALT, which will give your host OS control of your mouse again. This isn’t something you should need to do too often, because this usually happens automatically. But if the VM takes over your mouse completely, you might be stuck within the VM without this shortcut. So, if you can’t seem to return to your host OS, press CTRL+ALT.

Let’s go back to our VM, there’s one more thing I want to point out. At first, performance within your VM might be terrible. On my end, I’m using a fairly capable laptop, but as you’ll see Fedora is so slow within the VM that it’s barely usable.

To fix that, we’ll need to enable 3D acceleration. This is disabled by default, but it’s a per-VM setting that you’ll need to toggle each time you create one. If you chose a different distribution other than Fedora, there’s an additional package you may need to install but we’ll cover that in the next section.

However, you’ll notice that it’s still running slow. That’s okay, because the problem will be fixed the next time we power on the VM. For me, 3D acceleration wouldn’t work after a restart, for some reason the setting only applies when the machine is powered on. We’ll see the difference shortly. For now, I’ll just go through the installation of the VM.

Now that installation is done, let’s power off the VM to make sure 3D acceleration gets properly enabled.

Now, we’ll power it back on by simply clicking on it.

The next thing I want to do is show you a feature related to VM creation, express installation. With Express Installation, most of the process of setting up a VM will be done for you.

To see it in action, we’ll need to choose an OS that supports this. Some do, some don’t. An example of one that does is openSUSE, so I’ll choose that.

We’ll see the same screen as we did last time when we set up the Fedora VM, but there’s an additional option now.

So we’ll enable express installation, and fill out the information. Once we do that, openSUSE will begin installing without us needing to answer a bunch of prompts.

It’s hit or miss whether or not any particular distribution supports this, but it’s worth enabling the Express Installation feature if you happen to see it.

Guest Tools

Now that we’ve set up one or more VMs, there might be another step required when it comes to setting up 3D acceleration. If you’ve used other virtualization solutions, then you’re probably accustomed to installing a special piece of software to enhance the performance of your VM, known as guest tools.

Some distributions are smart about this, and automatically enable guest tools if it detects that its being installed within a VM. Other distributions will make you do this manually.

In the case of Fedora, guest tools are built in, so all we had to do was enable the 3D acceleration option and power cycle the VM. After we did that, we had much better performance.

For other distributions, you may need to install the spice-vdagent package in addition to enabling 3D acceleration. I’ll leave some commands on the screen for a handful of popular distros, so if guest tools aren’t already installed then you can run the appropriate command for your distro. Remember, you’re installing the guest tools package inside the VM, not your host machine.

USB Redirection

Continuing, now that we’ve installed GNOME Boxes and saw the process of creating virtual machines, what I want to do for the remainder of this article is cover a few popular features you should be aware of. The first, is USB redirection.

The concept is relatively simply – suppose you have a physical USB device you want to access from within your VM, such as a flash drive.

Once you plug a flash drive into your host machine’s USB port, your computer’s OS will mount it automatically. This means that by default, any USB device you plug in will only be accessible from your host.

To “redirect” a USB to a VM instead, the process is relatively simple. First, connect your device.

After you do that, visit the preferences page for the VM you want to have access to the device. On the “Devices & Shares” tab, you can choose your USB device. Once you do, you should have access to it immediately.

Snapshots

Another feature I want to make you aware of is that you can also create snapshots of your VM. If you’re familiar with the concept from another virtualization platform, then its the same idea here.

Basically, a snapshot is a point in time backup of your VM – and you can revert back to the state within the snapshot at any time. The most common use-case for this is for those of you that want to try something, such as installing a piece of software or updates, and then have a way to undo that change if things don’t go well.

GNOME Boxes is Awesome!

If you’re looking for a simple virtualization solution, GNOME Boxes is great – we explored some of its feature-set, but definitely try it out for yourself and see what else you can discover!

  • Ad-free Content
  • Early access to select videos
  • Discord access

And more!