When you’ve installed an operating system in a virtual machine, you usually want to install special drivers and tools inside it to enhance performance and features. With VirtualBox, this is done through the Guest Additions.
Many guides out there instruct you to install VirtualBox Guest Additions from the CD image (ISO). But in recent versions of Ubuntu, you can install them through the package manager, which is much simpler, and you can keep the Guest Additions automatically updated.
In Ubuntu 20.04 (Focal Fossa), the Guest Additions are installed by typing:
sudo apt install virtualbox-guest-dkms virtualbox-guest-x11
If it doesn’t work, make sure you have the
multiverse repository enabled:
sudo add-apt-repository multiverse
That’s all. Thanks to LinuxConfig.org for instructions.