Initial Steps
Open VirtualBox
Go to Shared Folders section and add a new shared folder
On Add Share prompt, select the Folder Path in your host that you want to be accessible inside your VM. Type shared
for the Folder Name. Make sure that Read-only and Auto-mount are unchecked and Mount point is blank. Then click OK.
Once your VM is up and running, go to Devices -> Insert Guest Additions CD image
Use the following command to mount the CD
1 | sudo mkdir /media/cdrom |
Install dependencies for VirtualBox guest additions
1 | sudo apt-get update |
Run the installation script for the guest additions. Wait until the installation completes.
1 | sudo /media/cdrom/./VBoxLinuxAdditions.run |
Reboot VM
1 | sudo shutdown -r now |
Create shared
directory in your home
1 | mkdir ~/shared |
Mount the shared folder from the host to your ~/shared
directory
1 | sudo mount -t vboxsf shared ~/shared |
The host folder should now be accessible inside the VM.
1 | cd ~/shared |
Q&A
error while loading shared libraries: libXt.so.6:
1 | sudo apt install libxt6 |