Ben Chuanlong Du's Blog

It is never too late to learn.

Use Share Folders in VirtualBox

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Do NOT check any of the following options unless you know what you are doing.

    • Read-only
      • You won't be able to write to the share directory.
    • Auto-mount
      • Auto-mount uses the root account by default.
      • Not sure whether it uses the user account if a root account is not created in the VM.
    • Make Machine-permanent
      • You won't be able to mount it manually even if you try to unmount it first.
    • Make Global
      • You won't be able to mount it manually even if you try to unmount it first.

    Image

  2. It is suggested that you mount a shared folder manually.

    sudo mount -t vboxsf -o uid=$(id -u),gid=$(id -u),fmask=177,dmask=077 \
        name_of_shared_folder mount_point
    
  3. As alternatives to shared folders, you can

    • SSH into the host machine
    • use sshfs
    • start JupyterLab, VSCode Servers on the host and work in the guest VM

Comments