Install VirtualBox Guest Additions on Ubuntu VirtualBox VM

29/12/2020
If you’re using VirtualBox for virtualization, then VirtualBox Guest Additions is a must have tool for you.

VirtualBox Guest Additions allows you to use the following features of VirtualBox:

  • Mouse pointer integration: You can move in and move out of the VM freely. You no longer need to press the Host key (usually Right <Ctrl> key).
  • Shared folders: You can share folders/directories from your host computer to the VirtualBox VM.
  • Shared clipboard: You will be able to share clipboards between the host and the VM.
  • 3D and 2D acceleration: You will be able to use 2D and 3D graphics acceleration in your VirtualBox VM.
  • Resizable VM Window: You will be able to freely resize the VM window and the VM screen resolution will automatically adjust.
  • Time synchronization: You will be able to synchronize the host time with the VM.

In this article, I am going to show you how to install VirtualBox Guest Additions on your Ubuntu VM. So, let’s get started.

Installing Required Build Tools on the Ubuntu VM:

In order to install VirtualBox Guest Additions on Ubuntu, you will have to install all the required build tools.

First, start your Ubuntu VirtualBox VM, open a Terminal and update the APT package repository cache with the following command:

$ sudo apt update

The APT package repository cache should be updated.

Now, install all the required build tools with the following command:

$ sudo apt install build-essential linux-headers-$(uname -r) dkms

Now, press Y and then press <Enter> to confirm the installation.

The APT package manager should start downloading all the required packages from the official package repository of Ubuntu.

At this point, all the required packages should be installed.

Now, shutdown the Ubuntu VM with the following command:

$ sudo poweroff

Inserting the VirtualBox Guest Additions CD to the VM’s CDROM:

Now, you have to insert the VirtualBox Guest Additions CD to the Ubuntu VM.

First, select the Ubuntu VM and click on Settings.

Now, from Storage, select the CDROM device, click on the CD icon and click on Remove Disk from Virtual Drive.

The currently attached CD/DVD should be ejected. Now, click on OK.

Now, select your Ubuntu VM and click on Start to start the VM.

Once the Ubuntu VM starts, click on Devices > Insert Guest Additions CD image… as marked in the screenshot below. The VirtualBox Guest Additions CD image should be attached to the virtual CDROM of the Ubuntu VM.

Installing VirtualBox Guest Additions Graphically:

Once you insert the VirtualBox Guest Additions CD image, Ubuntu should ask whether you want to install VirtualBox Guest Additions or not as you can see in the screenshot below.

You can click on Run to start the installation.

You can also navigate to the VirtualBox Guest Additions CD from the file manager and click on Run Software in order to start the installation. Both ways work just fine.

Once you click on Run, Ubuntu will ask you for the password of your login user. Type in the password of your login user and click on Authenticate.

The installation should start. It may take a while to complete.

The installer is updating the kernel.

At this point, the installation should be complete. Now, press <Enter> to close the Terminal window.

Now, restart your Ubuntu VM for the changes to take effect with the following command:

$ sudo reboot

Installing VirtualBox Guest Additions from the Command Line:

If you’re using Ubuntu server without any graphical user interface, then installing VirtualBox Guest Additions from the command line is your only option.

Once you attached the VirtualBox Guest Additions CD image to the virtual CDROM of your Ubuntu VM, mount the CD image to the /mnt directory with the following command:

$ sudo mount /dev/sr0 /mnt

The VirtualBox Guest Additions CD image should be mounted in the /mnt directory.

Now, navigate to the /mnt directory as follows:

$ cd /mnt

You should see VBoxLinuxAdditions.run shell script in there.

$ ls -lh

Now, run the VBoxLinuxAdditions.run shell script with superuser privileges as follows:

$ sudo bash VBoxLinuxAdditions.run

The installation should start. It may take a while to complete.

The installer is updating the kernel.

At this point, the installation should be complete.

Now, restart your Ubuntu VM for the changes to take effect with the following command:

$ sudo reboot

Enabling Some VirtualBox Guest Additions Features:

Once you have VirtualBox Guest Additions installed, you will immediately be able to resize the VirtualBox window to any size and your Ubuntu VM will adjust to it automatically.

You can also enable Shared Clipboard and Drag and Drop features from the General > Advanced settings of Ubuntu VM.

So, that’s how you install VirtualBox Guest Additions on Ubuntu VirtualBox VM. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Install Clear Linux (Intel Linux OS) on a Virtual Machine using VirtualBox

The Clear Linux Project for Intel Architecture is building a Linux OS distribution targeted for various cloud use cases. The...
28/12/2020

Increase VirtualBox Disk Size

Virtual machines are some of the most important tools in an IT professional’s tool-kit. You can test unknown software,...
28/12/2020

Manage VirtualBox remotely with RemoteBox – Install on Linux

RemoteBox is a VirtualBox client tool that enables you to essentially administer the installation of a virtualbox on a...
28/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

SỰ KHÁC BIỆT GIỮA RESIDENTIAL PROXY VÀ PROXY DATACENTER
17/02/2024

Mua Proxy v6 US Private chạy PRE, Face, Insta, Gmail
07/01/2024

Mua shadowsocks và hướng dẫn sữ dụng trên window
05/01/2024

Tại sao Proxy Socks lại được ưa chuộng hơn Proxy HTTP?
04/01/2024

Mua thuê proxy v4 nuôi zalo chất lượng cao, kinh nghiệm tránh quét tài khoản zalo
02/01/2024