Install VirtualBox on Ubuntu Step-by-Step

x32x01
  • by x32x01 ||
VirtualBox is a powerful open-source virtualization tool by Oracle, allowing you to run multiple operating systems on your computer at the same time. Whether you’re a developer, tester, or tech enthusiast, VirtualBox provides an easy and efficient way to create and manage virtual machines (VMs).

In this guide, you’ll learn how to install VirtualBox on Ubuntu and other Debian-based distributions using two different methods.

🧰 Prerequisites​

Before installing VirtualBox, make sure you have the following:
  • A user account with sudo privileges
  • A Terminal window (open it using Ctrl + Alt + T)



🪟 Option 1: Install VirtualBox from Ubuntu Repositories​

This is the easiest and fastest way to install VirtualBox.

Step 1: Update your system repositories​

Code:
sudo apt-get update

Step 2: Install VirtualBox​

Code:
sudo apt-get install virtualbox

Step 3: Install the VirtualBox Extension Pack​

Code:
sudo apt-get install virtualbox-ext-pack

Read and accept the VirtualBox Extension Pack License (PUEL) by selecting <Ok> and then <Yes>.

✅ Once installed, you’ll have access to features like USB 2.0/3.0 support, Remote Desktop, and encryption tools.



🧩 Option 2: Install VirtualBox from Oracle’s Official Repository​

If you need the latest version of VirtualBox with the newest patches and features, install it directly from Oracle’s repository.

Step 1: Install Supporting Software​

This package lets you manage third-party repositories.
Code:
sudo apt-get install software-properties-common

Step 2: Install Oracle GPG Keys​

These keys verify the authenticity of downloaded packages.
Code:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

Step 3: Add VirtualBox Repository​

Code:
echo "deb [arch=amd64] http://virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Step 4: Update Repositories​

Code:
sudo apt-get update

Step 5: Install the Latest VirtualBox Version​

To install VirtualBox 6.1 (latest stable at time of writing):
Code:
sudo apt-get install virtualbox-6.1

💡 If you’re running a 32-bit OS, install the older version:
Code:
sudo apt-get install virtualbox-5.2



🔌 Install VirtualBox Extension Pack (Manually)​

To enable advanced features such as USB 3.0, Remote Desktop, and encryption, install the Extension Pack manually.

Step 1: Download the Extension Pack​

Code:
wget https://download.virtualbox.org/virtualbox/6.1.26/Oracle_VM_VirtualBox_Extension_Pack-6.1.26.vbox-extpack

Step 2: Install the Extension Pack​

Code:
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.26.vbox-extpack
Confirm and allow the installation to complete.



🖥️ How to Use VirtualBox​


Step 1: Launch VirtualBox​

Code:
virtualbox

Step 2: Create a New Virtual Machine​

Click New (or Add) to start creating a VM. Choose the OS type and version, then click Next.

Step 3: Allocate Resources​

Assign memory, storage, and CPU resources. If unsure, stick with the default recommendations.

Step 4: Start Your Virtual Machine​

Once configured, select your new VM from the left panel and click the green Start button ▶️.
A new window will open, booting up your virtual system! 🚀



🎯 Conclusion​

Installing VirtualBox on Ubuntu is simple, whether you use the Ubuntu repository or the official Oracle source.
Once set up, you can easily create, manage, and run multiple operating systems securely and efficiently.
So go ahead - spin up a new VM and start experimenting today! 💻✨
 
Last edited:
Related Threads
x32x01
Replies
0
Views
1K
x32x01
x32x01
x32x01
Replies
0
Views
721
x32x01
x32x01
x32x01
Replies
0
Views
823
x32x01
x32x01
x32x01
Replies
0
Views
906
x32x01
x32x01
x32x01
  • x32x01
Replies
0
Views
64
x32x01
x32x01
x32x01
Replies
0
Views
763
x32x01
x32x01
x32x01
Replies
0
Views
799
x32x01
x32x01
x32x01
Replies
0
Views
738
x32x01
x32x01
x32x01
Replies
0
Views
873
x32x01
x32x01
x32x01
Replies
0
Views
742
x32x01
x32x01
Register & Login Faster
Forgot your password?
Forum Statistics
Threads
628
Messages
633
Members
64
Latest Member
alialguelmi
Back
Top