Linux Tactic

Mastering Virtualization: Installing VirtualBox on Ubuntu

Installing VirtualBox: From Oracle Repositories

In today’s digital age, virtualization has become the cornerstone of the IT industry. Among all the available solutions, VirtualBox from Oracle comprises a popular open-source virtualization software that is utilized by many developers, system administrators, and users globally.

This article will discuss how to install VirtualBox from Oracle repositories on Ubuntu. We’ll cover all the necessary information for each step, including importing GPG keys, adding the VirtualBox APT repository, installing VirtualBox 6.0, and installing the

VirtualBox Extension Pack.

Importing GPG keys for Oracle VirtualBox repository

The first step is to import the GPG keys for the Oracle VirtualBox repository. This ensures that the downloaded packages are authentic and from a trustworthy source.

Open the terminal and input the following code:

“`sh

wget -q https://www. virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add –

“`

Adding VirtualBox APT repository

The next step is to add the VirtualBox APT repository. An APT repository is a URL or a local directory containing Debian packages.

Ubuntu’s APT package system works by retrieving package lists (metadata) from the repositories and downloading packages as required. To add the VirtualBox APT repository, enter the following command in the terminal window:

“`sh

sudo add-apt-repository “deb [arch=amd64] https://download.

virtualbox.org/

virtualbox/debian $(lsb_release -cs) contrib”

“`

This code downloads VirtualBox packages that support the x86_64 architecture and adds the APT repository to the system’s package sources. Installing VirtualBox 6.0

The next step is to install VirtualBox 6.0 using the apt package list.

The apt package list enables you to find the latest version of VirtualBox, which means you do not have to go through the hassle of downloading and installing from their official website. Run the following command to update the package lists:

“`sh

sudo apt update

“`

Then, install VirtualBox 6.0 by running:

“`sh

sudo apt install

virtualbox-6.0

“`

VirtualBox Extension Pack

The final step to complete the installation of VirtualBox is to download and import the Oracle license-based Extension Pack. The Extension Pack enhances the features of VirtualBox by adding additional functionality and support for USB 2.0 and 3.0 devices, VirtualBox Remote Desktop Protocol, and more.

First, download the Extension Pack from the VirtualBox Downloads page: https://www. virtualbox.org/wiki/Downloads

Once you have downloaded the Extension Pack, open VirtualBox and navigate to the “File” menu and select “Preferences.” Go to the “Extensions” tab, click on the “+” icon, and add the Extension Pack.

Click on “Install” and accept the license agreement to complete the installation. Installing VirtualBox: From Ubuntu Repositories

If you prefer not to use Oracle repositories, you can perform a more straightforward and seamless installation of VirtualBox from the official Ubuntu repositories.

The VirtualBox version available in the Ubuntu repositories may not be the latest version, but it is a stable version recommended for production environments. Installing VirtualBox and the Extension Pack is as easy as running the following command:

“`sh

sudo apt install

virtualbox

virtualbox-ext-pack

“`

Closing Thoughts

VirtualBox is an indispensable tool for running virtual machines on your local machine. This guide has walked you through a step-by-step process on how to install VirtualBox on Ubuntu through Oracle repositories or Ubuntu repositories.

Following these instructions will ensure you have a seamless installation and be up and running in no time. Starting VirtualBox: The Simple Way

Now that we have installed VirtualBox on Ubuntu, the next step is to start it up and begin creating virtual machines.

There are two primary ways you can start VirtualBox, and we will discuss them both in this section.

Starting VirtualBox from the Command Line

One of the easiest ways to start VirtualBox is by entering the command in the terminal. It is done as follows:

“`sh

virtualbox

“`

This command allows you to run VirtualBox from the terminal. The advantage of this method is that it presents the user with any potential error messages in the terminal.

From there, you can troubleshoot the error and resolve it.

Starting VirtualBox from the VirtualBox Icon

For most people, starting VirtualBox from the command line can be a bit cumbersome. An alternative method is to utilize the VirtualBox icon.

You can access it from the application launcher or create a shortcut on the desktop. Once the icon is available, a single click on it will launch the VirtualBox interface.

From there, you can start working on creating virtual machines. Installing VirtualBox on Ubuntu 18.04 Machine

VirtualBox is a powerful virtualization tool that enables you to run multiple operating systems on a single host machine.

In this section, we will discuss installing VirtualBox on an Ubuntu 18.04 machine. Step 1: Update the OS

Open up the terminal window and run the following command to update the system:

“`sh

sudo apt-get update && sudo apt-get upgrade

“`

Step 2: Add VirtualBox APT Repository

To install VirtualBox, we need to add the Oracle VirtualBox repository’s APT source. To do this, you need to execute the command below:

“`sh

wget -q https://www.

virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add –

sudo add-apt-repository “deb [arch=amd64] https://download. virtualbox.org/

virtualbox/debian bionic contrib”

“`

Step 3: Install VirtualBox

Run the following command to install VirtualBox on Ubuntu:

“`sh

sudo apt-get update

sudo apt-get install

virtualbox-6.1

“`

Step 4: Install

VirtualBox Extension Pack

The final step in installing VirtualBox on Ubuntu 18.04 is to install the Extension Pack. To do this, you need to download the Extension Pack package from the VirtualBox website.

After downloading, open VirtualBox, click on “File,” select “Preferences,” then go to the “Extensions” tab. Finally, click on the “+” sign to add the Extension Pack.

Windows or Linux Guest Machine

VirtualBox enables you to run various operating systems as guest machines within your host Ubuntu machine. In this section, we will discuss how to install Windows or Linux as a guest machine in VirtualBox.

Creating a Windows Guest Machine in VirtualBox

Below is a step-by-step process to create a Windows guest machine in VirtualBox:

Step 1: Download Windows ISO

Download the Windows ISO files. Make sure you download a version compatible with VirtualBox.

Step 2: Create a New Virtual Machine

Open the VirtualBox application, click on “New” to create a new virtual machine. Give your machine a name, select “Microsoft Windows” as Type and “Windows (64-bit)” as Version.

Step 3: Assign Resources

Determine the amount of RAM and hard disk space you want to allocate to the Windows virtual machine. Step 4: Add Windows ISO File

On the “Storage” tab, click on the empty CD drive icon and select “Choose Virtual Optical Disc file.” Then browse your computer to find and select the Windows ISO file you had downloaded.

Step 5: Install Windows Operating System

Start your Windows virtual machine by clicking on the “Start” button. Follow the Windows installation process.

Creating a Linux Guest Machine in VirtualBox

Below is a step-by-step process to create a Linux guest machine in VirtualBox:

Step 1: Download Linux ISO

Download the Linux ISO file. Make sure you download a version compatible with VirtualBox.

Step 2: Create a New Virtual Machine

Open the VirtualBox application, click on “New” to create a new virtual machine. Give your machine a name, select “Linux” as Type and choose the correct version.

Step 3: Assign Resources

Assign resources to the Linux virtual machine, including the amount of RAM and hard disk space. Step 4: Add Linux ISO File

On the “Storage” tab, click on the empty CD drive icon and select “Choose Virtual Optical Disc file.” Then browse your computer to find and select the Linux ISO file you had downloaded.

Step 5: Install Linux Operating System

Start your Linux virtual machine by clicking on the “Start” button. Follow the Linux installation process.

Final Thoughts

VirtualBox is a game-changing tool that enables you to run one or more guest machines on a single physical host machine. With this guide, you can comfortably install VirtualBox on your Ubuntu 18.04 machine and then create one or more guest machines, whether running Windows or Linux.

In conclusion, VirtualBox is an essential tool in today’s IT industry that facilitates running multiple operating systems on a single host machine. This article covered how to install VirtualBox on Ubuntu 18.04, start VirtualBox, and create guest machines running Windows or Linux.

We highlighted the importance of updating the operating system, adding a VirtualBox APT repository, installing VirtualBox, and installing the Extension Pack. Whether you are a developer, system administrator, or user, you can benefit from VirtualBox’s functionalities.

Overall, VirtualBox is a game-changing tool that is simple to use and effective, enabling users to create a seamless virtualization experience.

Popular Posts