Yesterday I talked about how to create an Ubuntu VM in VirtualBox, and today I will talk about installing VirtualBox Guest Additions in Ubuntu. This of course requires the use of the command line!
VirtualBox Guest Additions are very similar to the virtual machine add-ons that come with Virtual PC. Basically, they add a couple of nice additional features that increase performance and provide better integration between the guest OS and the host OS.
- Ability to move the mouse between the guest and host OS without having to right-click. CTRL key to switch.
- Clipboard support, so you can cut and paste between guest and host OS.
- Automatically resize the guest OS when the VirtualBox window is resized.
Here are the steps to install Guest Additions in Ubuntu for VirtualBox:
Step 1. First start the Ubuntu guest OS, then click on “Devices” and select “Install Guest Additions”.
The Guest Additions ISO will now be mounted automatically and you should see a CD icon on your desktop.
Step 2: Now, while inside Ubuntu, click on Applications, then Accessories, and then Terminal. You can also use the keyboard shortcut ALT + F2 and then search for Gnome-Term.
Step 3. Now change to the directory where the Guest Additions are stored by typing the following:
cd / media /
Then enter ls to list the files. You may see something like cdrom or some other name for the CD image. In my case it was aseem, which is the name I used when installing Ubuntu. CD to that directory and run another ls.
There is a directory starting with VBox that you need to burn the CD to. When you run ls here, you should see several files, some for Windows and some for Linux.
Since my computer is not 64-bit and we are running Ubuntu here, we will need to run the Linux x86 installer. Go ahead and enter the following to install:
You will be prompted for an administrator password and installation will begin.
Step 4. The installer will create some new folders, etc., and install the Guest Additions.
Step 5: After the installation is complete, you need to reboot the guest OS. You can restart Ubuntu 16 from the command line by simply typing sudo restart. You can also press the Ubuntu button and restart from there.
When Ubuntu boots up, a message will appear stating that the guest OS supports mouse pointer integration. If you see this message, it means that you have successfully installed VirtualBox Guest Additions on Ubuntu.
You can now enjoy Ubuntu at a higher resolution than 800×600 as it supports 3D acceleration after installing the Guest Additions. Enjoy!