{"id":8433,"date":"2021-03-26T20:04:01","date_gmt":"2021-03-26T17:04:01","guid":{"rendered":"https:\/\/kifarunix.com\/?p=8433"},"modified":"2024-03-19T18:24:28","modified_gmt":"2024-03-19T15:24:28","slug":"install-virtualbox-guest-additions-on-ubuntu-21-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-virtualbox-guest-additions-on-ubuntu-21-04\/","title":{"rendered":"Install VirtualBox Guest Additions on Ubuntu 21.04"},"content":{"rendered":"\n
If you have installed Ubuntu 21.04 on VirtualBox, you realize that it is not in fullscreen. In this guide, you will learn how to install VirtualBox guest additions on Ubuntu 21.04. Apart from enabling the virtual machine to have a full screen view, guest additions offers many other features;<\/p>\n\n\n\n
You can read more about these features on the VirtualBox User Manual<\/a>.<\/p>\n\n\n\n Follow the link below to learn how to install Ubuntu 21.04 on VirtualBox.<\/p>\n\n\n\n Install Ubuntu 21.04 Desktop on VirtualBox<\/a><\/p>\n\n\n\n Before you can proceed to install VirtualBox Guest Additions, you first need to install required build tools, the Linux kernel headers and the support modules, if not already installed.<\/p>\n\n\n\n Run the command below to verify if these requirements have already been installed.<\/p>\n\n\n\n The You can then install the missing tools by running the command;<\/p>\n\n\n\n If none if these packages is installed, you can simply use the APT package manager to install them.<\/p>\n\n\n\n In order to install VirtualBox Guest Additions, you need to have the Guest Additions ISO file. Guest Addition ISO file can be inserted into the VM in two ways;<\/p>\n\n\n\n To manually insert the VirtualBox Guest Additions ISO file on your Ubuntu 21.04 VM, navigate to Menu bar on your VM and click Devices > Insert Guest Additions CD image<\/strong>. Note that before you can insert the ISO file, you need to have at least one empty IDE controller.<\/strong><\/p>\n\n\n\n When inserted, a dialog box which prompts you to run or cancel the Guest Additions installer is launched.<\/p>\n\n\n Click Run<\/strong> to launch the installation of Guest additions on Ubuntu 21.04. You will be prompted to enter your password to authenticate the installation.<\/p>\n\n\n\n Upon successful authentication, the Guest Addition installation will now run.<\/p>\n\n\n\n Once the Guest Additions are installed, Press Enter<\/strong> to close the installation wizard.<\/p>\n\n\n\n Reboot your system to reload the Kernel modules.<\/p>\n\n\n\n If upon reboot the screen do not auto adjust upon login, click on the VM menu View > Auto-resize Guest Display<\/strong> and toggle the option to put the vm on full screen.<\/p>\n\n\n\n You can also install the Guest Additions from the terminal. Therefore press cancel<\/strong> when the installer dialog box opens up and the iso image will be mounted on the system.<\/p>\n\n\n\n When the Guest Addition ISO file is inserted, it is mounted on To install guest additions from the terminal, navigate to the mount point of the guest additions and run the command below;<\/p>\n\n\n\n or simply run;<\/p>\n\n\n\n Reboot your system to reload the Kernel modules.<\/p>\n\n\n\n It is also possible to install the Guest Additions ISO file from Ubuntu repos.<\/p>\n\n\n\n Guest Additions ISO file is provided by the If it is available, simply run the command below to install it.<\/p>\n\n\n\n When installed, the VirtualBox Guest Additions ISO is now available as To install it, you need to mount it.<\/p>\n\n\n\n Next, run the installation.<\/p>\n\n\n\n Once the installation is done, restart your system to reload kernel modules.<\/p>\n\n\n\n You should now be on full screen and can be able to enable shared clipboard, shared folders, drag and drop…<\/p>\n\n\n\n NOTE: If upon system reboot the screen doesn’t auto-resize automatically, be sure to toggle (off\/on, so to say) \u00a0 Install VirtualBox Guest Additions on Kali Linux 2020.3<\/a><\/p>\n\n\n\n Install VirtualBox Guest Additions on Fedora 31\/32<\/a><\/p>\n\n\n\nInstalling VirtualBox Guest Additions on Ubuntu 21.04<\/h2>\n\n\n\n
Install Required Build tools and Kernel Headers<\/h4>\n\n\n\n
sudo dpkg -l | grep -E \"dkms|linux-headers-$(uname -r)|build-essential\"<\/code><\/pre>\n\n\n\n
ii linux-headers-5.11.0-11-generic 5.11.0-11.12 amd64 Linux kernel headers for version 5.11.0 on 64 bit x86 SMP<\/code><\/pre>\n\n\n\n
ii<\/code> means that the package is installed. As you can see from the output,
dkms<\/code><\/strong> and
build-essential<\/code><\/strong> are not installed.<\/p>\n\n\n\n
apt update<\/code><\/pre>\n\n\n\n
apt install dkms build-essential<\/code><\/pre>\n\n\n\n
sudo apt update -y<\/code><\/pre>\n\n\n\n
sudo apt upgrade<\/code><\/pre>\n\n\n\n
sudo apt install dkms linux-headers-$(uname -r) build-essential<\/code><\/pre>\n\n\n\n
Install VirtualBox Guest Additions<\/h4>\n\n\n\n
\n
Insert Guest Additions ISO File Manually<\/h5>\n\n\n\n
Install VirtualBox Guest Additions from UI<\/h6>\n\n\n\n
<\/figure><\/div>\n\n\n
Install VirtualBox Guest Additions from Terminal<\/h6>\n\n\n\n
\/media\/$USER\/VBox_GAs_6.x.x<\/code>. Where x is the build version of VirtualBox.<\/p>\n\n\n
<\/figure><\/div>\n\n\n
cd \/media\/$USER\/VBox_GAs_6.1.18<\/code><\/pre>\n\n\n\n
sudo .\/VBoxLinuxAdditions.run<\/pre>\n\n\n\n
sudo \/media\/$USER\/VBox_GAs_6.1.18\/VBoxLinuxAdditions.run<\/code><\/pre>\n\n\n\n
Installing Guest Additions ISO from Ubuntu Repositories<\/h5>\n\n\n\n
virtualbox-guest-additions-iso<\/code> package.<\/p>\n\n\n\n
sudo apt-cache policy virtualbox-guest-additions-iso<\/code><\/pre>\n\n\n\n
virtualbox-guest-additions-iso:\n Installed: (none)\n Candidate: 6.1.18-1\n Version table:\n 6.1.18-1 500\n 500 http:\/\/ke.archive.ubuntu.com\/ubuntu hirsute\/multiverse amd64 Packages\n 500 http:\/\/ke.archive.ubuntu.com\/ubuntu hirsute\/multiverse i386 Packages<\/code><\/pre>\n\n\n\n
sudo apt install virtualbox-guest-additions-iso<\/code><\/pre>\n\n\n\n
\/usr\/share\/virtualbox\/VBoxGuestAdditions.iso<\/strong><\/code>.<\/p>\n\n\n\n
sudo mount -o loop \/usr\/share\/virtualbox\/VBoxGuestAdditions.iso \/media\/<\/code><\/pre>\n\n\n\n
sudo \/media\/VBoxLinuxAdditions.run<\/code><\/pre>\n\n\n\n
<\/figure>\n\n\n\n
View -> Auto-resize Guest Display<\/strong><\/code> on the VM menu bar to set right VM resolution.<\/p>\n\n\n\n
Other Tutorials<\/h3>\n\n\n\n