
{"id":47014,"date":"2024-08-07T13:56:57","date_gmt":"2024-08-07T13:56:57","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=47014"},"modified":"2024-09-12T14:47:14","modified_gmt":"2024-09-12T14:47:14","slug":"virtualbox-guest-additions-ubuntu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2024\/08\/virtualbox-guest-additions-ubuntu\/","title":{"rendered":"Install VirtualBox Guest Additions for Ubuntu 24.04 VM"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/virtualbox-logo.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-44276\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/virtualbox-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/virtualbox-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/virtualbox-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/virtualbox-logo-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/virtualbox-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2023\/08\/virtualbox-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>This tutorial shows how to install the guest additions for Debian, Ubuntu, Linux Mint based systems that are running as Virtualbox virtual machine.<\/p>\n<p>Guest Additions is an external package designed to be installed inside a VirtualBox guest OS. It enables closer integration between the host and guest OSes, including features such as <b>shared folder<\/b>, custom video drivers, <b>seamless window<\/b> mode, and more.<\/p>\n<p>Guest Additions is not installed by default after installed your system as virtual machine. It&#8217;s however easy to install through the official CD image.<\/p>\n<div id=\"attachment_47015\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/ubuntu2404-guest.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47015\" class=\"size-large wp-image-47015\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/ubuntu2404-guest-700x467.webp\" alt=\"\" width=\"610\" height=\"407\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/ubuntu2404-guest-700x467.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/ubuntu2404-guest-300x200.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/ubuntu2404-guest-768x512.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/ubuntu2404-guest-1320x880.webp 1320w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/ubuntu2404-guest.webp 1353w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><p id=\"caption-attachment-47015\" class=\"wp-caption-text\">Ubuntu 24.04 Guest OS in VirtualBox<\/p><\/div>\n<p><!--more--><\/p>\n<h3>Step 1: Download &amp; Insert Guest Additions CD Image<\/h3>\n<p>If you installed VirtualBox through the official package from its website, then it includes the guest additions image file in the installation directory.<\/p>\n<p>In the case, just <b>boot your guest OS<\/b>, then go to the virtual machine menu <b>Devices<\/b> -&gt; <b>Insert Guest Additions CD image&#8230;<\/b>. Finally, you can access the disk content from in the guest OS file manager.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/insert-guest-image.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-47016\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/insert-guest-image.webp\" alt=\"\" width=\"581\" height=\"355\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/insert-guest-image.webp 581w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/insert-guest-image-300x183.webp 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/a><\/p>\n<p>Some packages (such as VBox in Ubuntu system repository) do NOT include that image. When you click the menu option, it pops up a dialog asking you to click download the image, which however may fail for unknown reason!<\/p>\n<p>In the case, you may follow the steps below to manually download and insert the CD image.<\/p>\n<div id=\"attachment_47017\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadditions-fail.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47017\" class=\"size-large wp-image-47017\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadditions-fail-700x275.webp\" alt=\"\" width=\"610\" height=\"240\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadditions-fail-700x275.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadditions-fail-300x118.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadditions-fail-768x301.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadditions-fail.webp 1308w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><p id=\"caption-attachment-47017\" class=\"wp-caption-text\">it prompted to click download guest additions disk image, but then failed<\/p><\/div>\n<h4>1. Download Guest Additions CD Image<\/h4>\n<p>As a workaround, you may manually <b>download the CD image<\/b> by visiting the link below in either host or guest OS:<\/p>\n<div class=\"wp-block-buttons aligncenter\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-vivid-cyan-blue-to-vivid-purple-gradient-background has-text-color has-background\" href=\"https:\/\/download.virtualbox.org\/virtualbox\" target=\"_blank\" rel=\"noreferrer noopener\">Download VirtualBox (Guest Additions)<\/a><\/div>\n<\/div>\n<p>Choose your VirtualBox version in the web page then select download the &#8216;VBoxGuestAdditions_x.x.xxx.iso&#8217; file.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadds.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-47018\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadds-700x426.webp\" alt=\"\" width=\"610\" height=\"371\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadds-700x426.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadds-300x183.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadds-768x468.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadds-1320x804.webp 1320w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/download-guestadds.webp 1363w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4>2. Insert the CD Image<\/h4>\n<p><strong>If you downloaded the CD image in the <i>host OS<\/i>,<\/strong> then close the virtual machine and open its <b>Settings<\/b> page.<\/p>\n<p>Next, navigate to &#8220;<b>Storage<\/b>&#8221; tab. Click &#8216;Adds optical drive&#8217; icon after <code>Controller: IDE<\/code>, finally choose to\u00a0add the downloaded guest additions CD image. Finally, boot the guest OS.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/add-ga-settings.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-47019\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/add-ga-settings-700x328.webp\" alt=\"\" width=\"610\" height=\"286\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/add-ga-settings-700x328.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/add-ga-settings-300x141.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/add-ga-settings-768x360.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/add-ga-settings.webp 1119w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p><strong>If you downloaded the image inside the guest OS,<\/strong> then, just right-click on the .iso image in your <i>Downloads<\/i> folder, and click <code>Open with Disk Image Mounter<\/code> option.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/mount-guestadditions.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-47020\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/mount-guestadditions-700x443.webp\" alt=\"\" width=\"610\" height=\"386\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/mount-guestadditions-700x443.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/mount-guestadditions-300x190.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/mount-guestadditions-768x486.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/mount-guestadditions.webp 1036w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h3>Step 2: Install the Guest Additions<\/h3>\n<p>If step 1 is done properly, then you&#8217;ll see the &#8220;<code>VBox_GAs_x.x.xx<\/code>&#8221; mounted in the left pane in your file manager.<\/p>\n<p>Just click on it to open the disk content page, right-click on blank area then choose &#8220;<b>Open in Terminal<\/b>&#8221; to open up a terminal window with that folder as working directory.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/open-additionaldriver-terminal.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-47021\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/open-additionaldriver-terminal-700x438.webp\" alt=\"\" width=\"610\" height=\"382\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/open-additionaldriver-terminal-700x438.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/open-additionaldriver-terminal-300x188.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/open-additionaldriver-terminal-768x480.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/open-additionaldriver-terminal.webp 1280w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>In the pop-up terminal window, finally run the 2 commands below one by one to install:<\/p>\n<ul>\n<li>First, install some dependency libraries via command:\n<pre>sudo apt install bzip2 build-essential gcc make perl dkms<\/pre>\n<\/li>\n<li>Next, run the installer in the directory to start installing the Guest Additions:\n<pre>sudo .\/VBoxLinuxAdditions.run<\/pre>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/install-guestadditions.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-47022\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/install-guestadditions-700x438.webp\" alt=\"\" width=\"610\" height=\"382\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/install-guestadditions-700x438.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/install-guestadditions-300x188.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/install-guestadditions-768x480.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/install-guestadditions.webp 1280w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>If you&#8217;re going to add shared folders for this VM, then <b>you also need to add user to <code>vboxsf<\/code> group.<\/b> To do so, run the command below in guest OS terminal window:<\/p>\n<pre>sudo gpasswd --add $USER vboxsf<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/vboxsf-group.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-47023\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/vboxsf-group-700x525.webp\" alt=\"\" width=\"610\" height=\"458\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/vboxsf-group-700x525.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/vboxsf-group-300x225.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/vboxsf-group-768x576.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/08\/vboxsf-group.webp 800w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>If you want to access USB device inside guest OS, then you need to add user into <code>vboxusers<\/code> group in the host OS (log out and back in required). For Linux host, use the command below in terminal:<\/p>\n<pre>sudo gpasswd --add $USER vboxusers<\/pre>\n<p>Finally, reboot your guest OS to apply the changes. And, open either <code>Settings<\/code> dialog or <code>Devices<\/code> menu to configure &#8220;shared folder&#8221;, &#8220;Shared Clipboard&#8221;, etc as you want!<\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to install the guest additions for Debian, Ubuntu, Linux Mint based systems that are running as Virtualbox virtual machine. Guest Additions is an external package designed to be installed inside a VirtualBox guest OS. It enables closer integration between the host and guest OSes, including features such as shared folder, custom [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":44276,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[38],"class_list":["post-47014","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-virtualbox"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/47014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=47014"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/47014\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/44276"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=47014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=47014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=47014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}