{"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<p>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<ul class=\"wp-block-list\">\n<li>Mouse pointer integration<\/li>\n\n\n\n<li>Shared folders for easy sharing of files between the host and the guest<\/li>\n\n\n\n<li>Ensures better and accelerated video performance.<\/li>\n\n\n\n<li>Seamless windows integration<\/li>\n\n\n\n<li>Generic host\/guest communication channels that enables you to control and manage guest execution.<\/li>\n\n\n\n<li>Provides Host-Guest time synchronization.<\/li>\n\n\n\n<li>Shared clipboard between host and guest vm.<\/li>\n\n\n\n<li>Automated logins.<\/li>\n<\/ul>\n\n\n\n<p>You can read more about these features on the&nbsp;<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/download.virtualbox.org\/virtualbox\/6.0.14\/UserManual.pdf\" target=\"_blank\">VirtualBox User Manual<\/a>.<\/p>\n\n\n\n<p>Follow the link below to learn how to install Ubuntu 21.04 on VirtualBox.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-ubuntu-21-04-desktop-on-virtualbox\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Install Ubuntu 21.04 Desktop on VirtualBox<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing VirtualBox Guest Additions on Ubuntu 21.04<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Install Required Build tools and Kernel Headers<\/h4>\n\n\n\n<p>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<p>Run the command below to verify if these requirements have already been installed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo dpkg -l | grep -E \"dkms|linux-headers-$(uname -r)|build-essential\"<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>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<p>The&nbsp;<code>ii<\/code>&nbsp;means that the package is installed. As you can see from the output, <strong><code>dkms<\/code><\/strong> and <strong><code>build-essential<\/code><\/strong> are not installed.<\/p>\n\n\n\n<p>You can then install the missing tools by running the command;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install dkms build-essential<\/code><\/pre>\n\n\n\n<p>If none if these packages is installed, you can simply use the APT package manager to install them.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt update -y<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt upgrade<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt install dkms linux-headers-$(uname -r) build-essential<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Install VirtualBox Guest Additions<\/h4>\n\n\n\n<p>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<ol class=\"wp-block-list\">\n<li><a class=\"rank-math-link\" href=\"#manual-install\">Insert Guest Additions ISO File Manually<\/a><\/li>\n\n\n\n<li><a href=\"#auto-install\">Install Guest Additions ISO Automatically from Ubuntu Repositories using APT package manager.<\/a><\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"manual-install\">Insert Guest Additions ISO File Manually<\/h5>\n\n\n\n<p>To manually insert the VirtualBox Guest Additions ISO file on your Ubuntu 21.04 VM,  navigate to Menu bar on your VM and click <strong>Devices &gt; Insert Guest Additions CD image<\/strong>. <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<h6 class=\"wp-block-heading\">Install VirtualBox Guest Additions from UI<\/h6>\n\n\n\n<p>When inserted, a dialog box which prompts you to run or cancel the Guest Additions installer is launched.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"786\" height=\"406\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/guest-additions-insert.png\" alt=\"\" class=\"wp-image-8438\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/guest-additions-insert.png?v=1616762843 786w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/guest-additions-insert-768x397.png?v=1616762843 768w\" sizes=\"(max-width: 786px) 100vw, 786px\" \/><\/figure><\/div>\n\n\n<p>Click&nbsp;<strong>Run<\/strong>&nbsp;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<p>Upon successful authentication, the Guest Addition installation will now run.<\/p>\n\n\n\n<p>Once the Guest Additions are installed, Press <strong>Enter<\/strong> to close the installation wizard.<\/p>\n\n\n\n<p>Reboot your system to reload the Kernel modules.<\/p>\n\n\n\n<p>If upon reboot the screen do not auto adjust upon login, click on the VM menu <strong>View &gt; Auto-resize Guest Display<\/strong> and toggle the option to put the vm on full screen.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Install VirtualBox Guest Additions from Terminal<\/h6>\n\n\n\n<p>You can also install the Guest Additions from the terminal. Therefore <strong>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<p>When the Guest Addition ISO file is inserted, it is mounted on <code>\/media\/$USER\/VBox_GAs_6.x.x<\/code>. Where x is the build version of VirtualBox.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"410\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/guest_additions_image-mounted.png\" alt=\"\" class=\"wp-image-8439\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/guest_additions_image-mounted.png?v=1616764935 809w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/guest_additions_image-mounted-768x389.png?v=1616764935 768w\" sizes=\"(max-width: 809px) 100vw, 809px\" \/><\/figure><\/div>\n\n\n<p>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<pre class=\"wp-block-preformatted\"><code>cd \/media\/$USER\/VBox_GAs_6.1.18<\/code><\/pre>\n\n\n\n<pre id=\"block-f2af62a8-3e56-4f3a-8426-59af9d81f242\" class=\"wp-block-preformatted\">sudo .\/VBoxLinuxAdditions.run<\/pre>\n\n\n\n<p>or simply run;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo \/media\/$USER\/VBox_GAs_6.1.18\/VBoxLinuxAdditions.run<\/code><\/pre>\n\n\n\n<p>Reboot your system to reload the Kernel modules.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"auto-install\">Installing Guest Additions ISO from Ubuntu Repositories<\/h5>\n\n\n\n<p>It is also possible to install the Guest Additions ISO file from Ubuntu repos.<\/p>\n\n\n\n<p>Guest Additions ISO file is provided by the <code>virtualbox-guest-additions-iso<\/code> package.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt-cache policy virtualbox-guest-additions-iso<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>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<p>If it is available, simply run the command below to install it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt install virtualbox-guest-additions-iso<\/code><\/pre>\n\n\n\n<p>When installed, the VirtualBox Guest Additions ISO is now available as <code><strong>\/usr\/share\/virtualbox\/VBoxGuestAdditions.iso<\/strong><\/code>.<\/p>\n\n\n\n<p>To install it, you need to mount it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo mount -o loop \/usr\/share\/virtualbox\/VBoxGuestAdditions.iso \/media\/<\/code><\/pre>\n\n\n\n<p>Next, run the installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo \/media\/VBoxLinuxAdditions.run<\/code><\/pre>\n\n\n\n<p>Once the installation is done, restart your system to reload kernel modules.<\/p>\n\n\n\n<p>You should now be on full screen and can be able to enable shared clipboard, shared folders, drag and drop&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1918\" height=\"899\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/ubuntu21.04-fullscreen-virtualbox.png\" alt=\"\" class=\"wp-image-8440\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/ubuntu21.04-fullscreen-virtualbox.png?v=1616770367 1918w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/ubuntu21.04-fullscreen-virtualbox-768x360.png?v=1616770367 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/03\/ubuntu21.04-fullscreen-virtualbox-1536x720.png?v=1616770367 1536w\" sizes=\"(max-width: 1918px) 100vw, 1918px\" \/><\/figure>\n\n\n\n<p>NOTE: If upon system reboot the screen doesn&#8217;t auto-resize automatically, be sure to toggle (off\/on, so to say) \u00a0<code><strong>View -> Auto-resize Guest Display<\/strong><\/code> on the VM menu bar to set right VM resolution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials<\/h3>\n\n\n\n<p><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-virtualbox-guest-additions-on-kali-linux-2020-3\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Install VirtualBox Guest Additions on Kali Linux 2020.3<\/a><\/p>\n\n\n\n<p><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-virtualbox-guest-additions-on-fedora-31-32\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Install VirtualBox Guest Additions on Fedora 31\/32<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-virtualbox-guest-additions-on-ubuntu-20-04\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"rank-math-link\">Install VirtualBox Guest Additions on Ubuntu 20.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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<\/p>\n","protected":false},"author":1,"featured_media":8443,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[36,121,46],"tags":[3333,954,3334,3330,3328,3331,3335,3332],"class_list":["post-8433","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-virtualization","category-howtos","category-virtualbox","tag-full-screen-display-virtualbox","tag-guest-additions","tag-install-guest-additions-ubuntu","tag-install-virtualbox-guest-additions-ubuntu-21-04","tag-ubuntu-21-04","tag-ubuntu-21-04-virtualbox-guest-additions","tag-virtualbox-6","tag-virtualbox-ubuntu-21-04-full-screen","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8433"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=8433"}],"version-history":[{"count":4,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8433\/revisions"}],"predecessor-version":[{"id":21881,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/8433\/revisions\/21881"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/8443"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=8433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=8433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=8433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}