VirtualBox 6.1 Shared Folders Configuration for Ubuntu 20.04
I often find the need to copy files from my Windows host machine to my Ubuntu 20.04 VirtualBox VM. Here’s how I set up a shared folder to do just that
1. VirtualBox Configuration
-
Boot up VirtualBox and select the VM you want to add a shared folder to
-
Open “Settings > Shared Folders”
- Click the folder with the “+” to add a new shared folder
- Select where the host folder is, and check the box to auto-mount the shared folder
- Click “OK”
2. Ubuntu VM Configuration
Launch your VM. You should see a new location mounted in your filesystem
To make access easier, add yourself to the vboxsf group. In a terminal run:
sudo adduser $USER vboxsf
Output:
[sudo] password for sean:
Adding user `sean' to group `vboxsf' ...
Adding user sean to group vboxsf
Done.
Now reboot your VM. After restarting you should be able to view the contents of your shared folder without having to change to root