Geekdosage
  • Home
  • Computer hardware
    • GPU
      • AMD
      • Nvidia
    • Processor
  • Linux
    • CentOS
    • Ubuntu
  • Docker
  • Computer Software
    • Operating System
      • Windows
      • MacOS
      • Android
  • Gaming
  • Computer Science
    • Network Engineering
    • Comparisons

Geekdosage

  • Home
  • Computer hardware
    • GPU
      • AMD
      • Nvidia
    • Processor
  • Linux
    • CentOS
    • Ubuntu
  • Docker
  • Computer Software
    • Operating System
      • Windows
      • MacOS
      • Android
  • Gaming
  • Computer Science
    • Network Engineering
    • Comparisons
LinuxUbuntu

How to Install VirtualBox in Ubuntu 20.04

by GeekDosage January 3, 2021
written by GeekDosage January 3, 2021
Install virtualbox in ubuntu

Install VirtualBox in Ubuntu 20.04

VirtualBox is a free and open-source tool developed by Oracle for running virtual machines on your PC. In this article, we are going to explain how to install VirtualBox in Ubuntu 20.04.

Prerequisites

  • Ubuntu server/PC with Sufficient hardware resources
  • non-root user with sudo privileges

Download the Debian package from the VirtualBox download page. You can use wget command to download the package using the terminal. The following command will download the Virtualbox Debian package version 6.1 which is the latest package when writing this tutorial.

$ wget https://download.virtualbox.org/virtualbox/6.1.12/virtualbox-6.1_6.1.12-139181~Ubuntu~eoan_amd64.deb

Install the downloaded Virtualbox package using the following command.

$ sudo dpkg -i virtualbox-6.1_6.1.12-139181~Ubuntu~eoan_amd64.deb

In some cases, you will experience an error similar to the below because of dependencies.

dpkg: error processing package virtualbox-6.1 (--install):

Processing triggers for shared-mime-info (1.15-1) ...

Errors were encountered while processing:

virtualbox-6.1

Execute the following command to complete the VirtualBox installation on ubuntu.

$ sudo apt install -f

Now you have successfully installed the Virtualbox. To verify, click on the Activities tab located on the top left corner of your Ubuntu desktop and type VirtualBox. You will see a similar result as below.

VirtualBox

Click to open VirtualBox.

VirtualBox Interface

How to create a virtual machine (VM) in VirtualBox

Let’s create a new VM in VirtualBox. First, select a new icon on the interface, and it will pop up a new window. We are going to create a Virtual machine with CentOS 8. Fill in the details accordingly. Then click next.

VM information

Choose the memory (RAM) size you wish to allocate to the VM. Consider the total memory size of your PC and the purpose of the VM. You can change this amount later. After selecting the memory size, click next.

VM memory size

Now it’s time to add a virtual hard disk to the virtual machine. You have three options

  1. Select do not add a hard disk option
  2. Create a virtual hard disk
  3. Select an existing virtual disk file

After choosing accordingly, click next

Create VM disk

In this window, you should pick a virtual disk type. Here we select VMDK since it is compatible with other virtualization tools.

VM Disk type

After selecting the disk file type, you can choose to set a fixed disk size or dynamic size. In other words, the dynamic disk will grow as you use the virtual disk. Therefore select accordingly and proceed to the next step.

VM disk options

Now you can select the storage disk size. The recommended disk is 8 GB.

VM Disk Size

Now you have created the VM.  Start the VM by clicking on the start button and it will pop up a window to choose an operating system image for the virtual machine. Click start after choosing the OS image file.

ISO file selection window

If you are facing an error similar to the below, Then enable the virtualization from your computer’s BIOS.

Error

The virtual machine will boot to the CentOS installation window.  Choose your language settings and click continue.

VM OS configuration

In this window, You have several steps to configure. First of all, choose the installation destination.  Click on Installation Destination and it will open a window.

In this window, select the storage you have created earlier.  Then click Done to confirm.

Now select Network & host management tab to enable networking to the virtual machine. It will open another window.

In this window enable the network connectivity and click on the Done button to save changes. You can change the hostname from this window under the Host Name input file.

 

You can change the operating system environment from Software Selection.

Select the Server option if you wish to install a headless version. Or else you can install CentOS with GUI. Therefore select accordingly and click on Done to save changes.

Now you have applied all the required changes. Click on the Begin Installation button to proceed with the installation.

During the installation process, you can set the root password by clicking on the Root Password tab. Enter a root password and click Done to confirm the changes.

 

After successfully installing CentOS on the virtual machine, click on the reboot button. You should remove the installation ISO image now. Come back to the virtual box main window.

In this main window, select the created VM and click on the settings (cock-wheel) icon. It will open up the settings window.

From this window click on the storage tab from the left side menu bar. You will see all the storage details related to the selected VM on the right side of the window.

Now select the CentOS image under the Controller: IDE section and click on the remove button which is located under the storage devices details.  It will prompt a new window to confirm your action. Click on remove and proceed.

 

That’s it. You have successfully installed the centOS in the VM.  Start the created VM from the main window.

Conclusion

In this tutorial, we explained how to install VirtualBox in Ubuntu 20.04. Moreover, how to Create a CentOS VM step by step. Please comment if you have any doubts and suggestions in the comment section.

 

GeekDosage
centos vmcreate centos vm on virtualboxinstall virtualbox in ubuntu 20.04virtualbox in ubuntu
0 comment
0
FacebookTwitterPinterest
previous post
How to Create a Private Docker Registry in Ubuntu 20.04
next post
How to rename a Directory in Linux?

Related Posts

How to fix “dial unix /var/run/docker.sock: connect: permission...

August 10, 2021

How to connect to your VirtualBox VM from...

August 8, 2021

How To Install Cloudflare Origin SSL Certificate with...

July 20, 2021

How to Stop all Docker Containers

June 8, 2021

Cloudflare Origin SSL vs. Let’s encrypt SSL

May 9, 2021

Best 10 Docker Hosting Services

April 7, 2021

How to Exit Vim

March 11, 2021

SCP Linux – Securely Copy Files in Linux...

February 22, 2021

How to Copy, Paste and Delete in Vim...

February 7, 2021

How to Copy Files Between Linux Servers Using...

February 4, 2021

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

In This Article

  • 1 Install VirtualBox in Ubuntu 20.04
    • 1.1 Prerequisites
    • 1.2 How to create a virtual machine (VM) in VirtualBox
    • 1.3 Conclusion

Keep in touch

Facebook Twitter Google + Instagram Pinterest Email

Popular Posts

  • How to change the forgotten root password in CentOS 8

  • How to remove/delete user in Linux

  • How to Create a Private Docker Registry in Ubuntu 20.04

  • How to Build a Docker Image from Dockerfile

About Geekdosage

Geekdosage is a technology based website which mainly focuses on network engineering, computer science, automation, computer hardware and software and internet technologies. Our purpose is to create a platform where anyone can access the subject areas without barriers.

Recent Posts

  • How to fix “dial unix /var/run/docker.sock: connect: permission denied” error

    August 10, 2021
  • How to connect to your VirtualBox VM from your Host OS using SSH

    August 8, 2021

Find us

Facebook Twitter Instagram Pinterest Email
  • About Us
  • Contact Us
  • Disclaimer
  • Terms and Conditions
  • Cookie Privacy policy
  • Privacy Policy
  • DCMA

@2021 - All Right Reserved | Designed and Developed by GeekDosage