Skip to content

Instantly share code, notes, and snippets.

@moalex
Last active August 22, 2023 19:04
Show Gist options
  • Save moalex/79486677aa10d04152b19a9055381605 to your computer and use it in GitHub Desktop.
Save moalex/79486677aa10d04152b19a9055381605 to your computer and use it in GitHub Desktop.

How to access a shared folder in VirtualBox

Add shared folder

VBoxManage sharedfolder add "VM name" --name sharename --hostpath "C:\test"

Mount shared folder

#!/bin/bash

_VBNAME="home"
_VBTARGET="$HOME/windows-home"
_VBUID=1000
_VBGID=1000

mkdir "$_VBTARGET"
sudo mount -t vboxsf -o uid=$_VBUID,gid=$_VBGID "$_VBNAME" "$_VBTARGET"
cd "$_VBTARGET" && ls -1

source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment