This is the only page that I’ve seen that correctly directs folks how to apply Virtualbox Guest Additions for GUI-less servers like Ubuntu server.
Basic gist of commands:
- Create Ubuntu server instance under VirtualBox (obviously).
- Start VM, goto Devices – Insert Guest Additions CD image to mount the ISO image.
- From the terminal, run the following commands:
- $ sudo su
- $ apt install gcc make
- $ mkdir –parents /media/cdrom
- $ mount /dev/cdrom /media/cdrom
- $ /media/cdrom/VBoxLinuxAdditions.run
- $ reboot
- After reboot:
- $ modinfo vboxguest
- $ sudo usermod –append –groups vboxsf — “$USER”
- $ cat /etc/group | grep “$USER”
- Host shares should now be mounted in Ubuntu guest under
/media
via the installedVBoxService
service, set to start on system boot-up. - All done.