Fri. Feb 23rd, 2024


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.

Click

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

Run the VirtualBox installer.

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.

VirtualBox is available for most Linux distros.

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.

Search for

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.”

Click the

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.”

Pick the name of your VM, the ISO you're going to use, and the location where the VM will be stored.

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.

Change the password.

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.”

Set the amount of memory and CPU cores you have on your VM.

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.

Create a 25GB virtual hard disk.

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.

Click the

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

The Ubuntu installation screen.

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.

Click

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

Click on the three-dot line menu icon then click

Click on the “Install” button near the top.

Click the

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

Select the extension pack and click

Finally, click on “Install” and accept the Terms and Conditions.

Click

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



Source link

By John P.

Leave a Reply

Your email address will not be published. Required fields are marked *