Learn how to install VirtualBox on Ubuntu Server 18 with this step-by-step guide. Follow easy instructions to set up your virtualization environment quickly and efficiently. #centlinux #ubuntu #virtualbox
Table of Contents
What is VirtualBox?
VirtualBox is a free and open-source hosted hypervisor for x86 virtualization, developed by Oracle Corporation. VirtualBox was created by Innotek, it was acquired by Sun Microsystems in 2008, which was in turn acquired by Oracle in 2010.
VirtualBox can be installed on Windows, macOS, Linux, Solaris and OpenSolaris. There are also ports to FreeBSD and Genode. It supports the creation and management of guest virtual machines running Windows, Linux, BSD, OS/2, Solaris, Haiku, and OSx86, as well as limited virtualization of macOS guests on Apple hardware. For some guest operating systems, a “Guest Additions” package of device drivers and system applications is available, which typically improves performance, especially that of graphics.
The core package is, since version 4 in December 2010, free software under GNU General Public License version 2 (GPLv2). The separate “VirtualBox Oracle VM VirtualBox extension pack” providing support for USB 2.0 and 3.0 devices, Remote Desktop Protocol (RDP), disk encryption, NVMe and Preboot Execution Environment (PXE) boot is under a proprietary license, called Personal Use and Evaluation License (PUEL), which permits use of the software for personal use, educational use, or evaluation, free of charge. Since VirtualBox version 5.1.30 Oracle defines personal use as the installation of the software on a single host computer for non-commercial purposes. (Source: Wikipedia)

VirtualBox Alternatives
If you’re considering alternatives to VirtualBox for your virtualization needs, there are several options available that cater to different use cases and preferences. Here are some popular VirtualBox alternatives:
VMware Workstation Player/Pro
- VMware offers both a free (Player) and a paid (Pro) version.
- Known for high performance and a wide range of features.
- Great support for various guest operating systems.
KVM (Kernel-based Virtual Machine)
- Integrated into the Linux kernel, making it a highly efficient option for Linux users.
- Powerful and suitable for enterprise-level virtualization.
- Often used with management tools like libvirt, virt-manager, or oVirt.
Hyper-V
- Microsoft’s virtualization platform, included with Windows 10 Pro and Windows Server.
- Excellent integration with other Microsoft products and services.
- Suitable for both desktop and server virtualization.
Parallels Desktop
- Popular choice for Mac users.
- Allows running Windows and other OSes on macOS with high performance.
- User-friendly interface and seamless integration with macOS features.
Proxmox VE
- An open-source virtualization management solution.
- Supports KVM for full virtualization and LXC for container-based virtualization.
- Web-based interface for easy management.
QEMU
- A free and open-source emulator and virtualizer.
- Works well with KVM for enhanced performance.
- Highly versatile and supports a wide range of hardware platforms and architectures.
Xen
- Open-source hypervisor providing high performance.
- Used by many large-scale cloud providers.
- Suitable for both para-virtualization and hardware-assisted virtualization.
Each of these alternatives has its own strengths and ideal use cases, so the best choice will depend on your specific requirements and environment.
Ubuntu Server Specification
We are using a minimal Ubuntu Server virtual machine with following specification.
- CPU – 3.4 Ghz (2 cores)
- Memory – 2 GB
- Storage – 20 GB
- Operating System – Ubuntu Server 18.04 LTS
- Hostname – virtualbox-01.centlinux.com
- IP Address – 192.168.116.218 /24
Installing VirtualBox on Ubuntu Server 18 requires a system with at least a 2 GHz dual-core processor and 2GB of RAM for virtualized environments, along with 20GB or more of free disk space to comfortably accommodate VirtualBox and your virtual machines. Since Ubuntu Server is designed to run efficiently on various hardware types, experimenting with VirtualBox is well-suited for mini PCs or VPS setups.
Using a VPS provider like Rose Hosting VPS offers a reliable Linux environment with dedicated resources, allowing you to test and develop your virtualization projects remotely without impacting your local machine’s performance.
[Grab a Mini PC for your Home Lab – Shop with Us!]
[Discover the Power of Rose Hosting VPS – Limited Time Offer!]
Disclaimer: This post contains affiliate links; using these links supports the blog at no extra cost to you.
Update Ubuntu Software Packages
Connect with virtualbox-01.centlinux.com as an admin user by using a ssh tool.
Execute following Linux command to check for updated software packages.
sudo apt updateInstall all available software updates using apt command.
sudo apt -y upgradeAdd VirtualBox APT Repository
VirtualBox 5.2 is available in default APT repositories. You can check this by executing following command at Linux bash prompt.
apt search virtualbox | grep -B2 "base binaries"Output:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
virtualbox/bionic-updates 5.2.34-dfsg-0~ubuntu18.04.1 amd64
x86 virtualization solution - base binaries
If you want to install VirtualBox on Ubuntu then you can easily install it using apt command.
However, if you wish to install the latest version of VirtualBox, then you are required to add VirtualBox official APT repository in your Linux server, and then you can install VirtualBox thereon.
Before adding VirtualBox APT repository, you should add the GPG key of this repository in your Ubuntu server (As mentioned in VirtualBox documentation).
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 -Edit APT repository’s sources list.
sudo vi /etc/apt/sources.listAnd add following directive therein.
# VirtualBox APT Repository
deb https://download.virtualbox.org/virtualbox/debian bionic contribRun following command to fetch information from VirtualBox repository.
sudo apt updateVirtualBox APT repository has been added in Linux Server.
Install VirtualBox on Ubuntu Server
Oracle VirtualBox 6.1 is the latest version at the time of this writing. Now, you can easily install VirtualBox on Ubuntu by using apt command.
sudo apt install -y virtualbox-6.1Oracle VirtualBox has been installed successfully.
Final Thoughts
Installing VirtualBox on Ubuntu Server 18 can be a straightforward process if you follow the right steps. Whether you are setting up a test environment or deploying virtual machines for production, VirtualBox offers a robust solution for your virtualization needs.
Need expert AWS and Linux system administration? From cloud architecture to server optimization, I provide reliable and efficient solutions tailored to your needs. Hire me today!
FAQs
1. Can I install VirtualBox on Ubuntu Server 18 without a GUI?
Yes, you can install and manage VirtualBox on Ubuntu Server 18 using the command line.
2. Do I need to add a repository to install VirtualBox?
Yes, you may need to add the Oracle VirtualBox repository for the latest version.
3. What dependencies are required for VirtualBox on Ubuntu Server 18?
You need essential packages like dkms, linux-headers, and build-essential.
4. Can I manage VirtualBox VMs on a server remotely?
Yes, you can use VBoxManage for command-line management or enable VRDP for remote access.
5. Is VirtualBox on Ubuntu Server 18 suitable for production environments?
VirtualBox is best for testing and development; for production, consider KVM or VMware ESXi.
Recommended Courses
If you are new to Linux and want a solid starting point, I highly recommend Ubuntu Linux Server Basics by Cody Ray Miller. This beginner-friendly guide walks you step by step through setting up and managing Ubuntu servers, making it perfect for students, sysadmins, and developers who want practical hands-on knowledge. With clear explanations and real-world examples, this resource can fast-track your Linux learning journey and save you countless hours of trial and error.
Disclaimer: This post contains affiliate links. If you purchase through these links, I may earn a small commission at no extra cost to you.

Leave a Reply
You must be logged in to post a comment.