Skip to main content

VirtualBox: Install Guest Additions in Linux VM

As mentioned in my previous post, I found VirtualBox pretty easy to install and make work. My only real difficulty was figuring out how to install the "Guest Additions" on Linux, as this is poorly documented. The "Guest Additions" are the VirtualBox equivalent of the "*-tools" of the commercial VM's and provide closer integration between the VM and host environment, so you usually want to install them.

Here are the steps I used to install the "Guest Additions" on Debian 8 & 9 with VirtualBox 6.1.*:

Step 1: Prepare for building a kernel module

$ sudo apt-get install build-essential module-assistant
$ sudo m-a prepare

Step 2: Run the Guest Additions install

  • Click the VirtualBox Devices menu on the VM.
  • Click "Insert Guest Additions CD image..."
  • Run the installer:
$ mount /media/cdrom
$ sudo sh /media/cdrom/VBoxLinuxAdditions.run
$ sudo reboot

Step 3: Fix permissions issue with shared folders

Unfortunately when you share a host folder with the VM, VirtualBox uses a group that normal users don't have (vboxsf), so I also added my user to that group:

$ sudo adduser <your user> vboxsf

Comments

Popular posts from this blog

Merging Git Repositories

No project of significant size that I've ever seen has retained its initial structure. Restructuring projects is a fact of life, but unfortunately Git doesn't make it easy. Fundamentally this stems from the way Git works, treating changes as a succession of snapshots and not storing any other metadata. Of course this is part of what makes Git fast and efficient, but at the expense of making some common operations more difficult for users. Git really is a perfect 21st century illustration of the classic  "Worse Is Better"  paradigm of successful software 😀 Previously I discussed how to split a Git project apart into separate repositories . Now I'm going to discuss how to do the opposite and merge separate repositories into one. On the face of it, this would seem a simpler task as Git has powerful support for merging... Let's take the opposite example to my splitting apart article - say you have a main Git repo (ProjA) and a second repo (ProjB) in...

East Devon Continued

Some iPhone pictures: Seaton Bay from Beer Hill at Sunset Gulls on Beer Beach We also had a pair of Pheasants in the garden, which was a bit of a surprise. There are always plenty of rabbits and wild birds, but this is the first time I've seen game birds. Here is the male, sitting on the garden wall, wondering what I'm up to: Male Pheasant I also spotted these attractive white Cyclamen in the garden: Cyclamen

Setting Environment Variables and the PATH on MacOS

Time Was setting environment variables and the PATH on a Mac running OSX was just like any other *IX.  However with successive OS releases Apple have changed how this works (more than once) and generally made it more difficult 😢  This article discusses how I go about setting environment variables on Mojave and Catalina. Why does this matter? MacOS doesn't add  /usr/local/bin to the PATH by default, which is unfortunate as most *IX-style programs you build yourself will be installed in there. If you only ever launch stuff from Terminal, all you have to do is set environment variables and the path from Shell startup files in the time immemorial fashion. However, this doesn't help with native Mac Apps like Emacs, which aren't launched from a shell and where you may still want to access custom environment variables and programs in /usr/local/bin . Setting the PATH In the past you could add to the path via /etc/paths (or paths.d ), however this no longer works...