LinuxCommandLibrary

mount.vboxsf

Mount VirtualBox shared folders

SYNOPSIS

mount.vboxsf sharename mountpoint [-o options] | [-h | -V]

PARAMETERS

sharename
    Name of shared folder from VirtualBox settings (required positional argument).

mountpoint
    Guest directory to mount into (required positional argument).

-o uid=UID
    User ID for file ownership.

-o gid=GID
    Group ID for file ownership.

-o dmode=MODE
    Octal permissions mode for directories (default 0755).

-o fmode=MODE
    Octal permissions mode for files (default 0644).

-o umask=MASK
    Umask applied to files and directories.

-o dmask=MASK
    Umask for directories only.

-o ttl=SECONDS
    Dentry time-to-live in seconds.

-h, --help
    Show usage help.

-V, --version
    Print version information.

DESCRIPTION

mount.vboxsf is the mount utility for the vboxsf filesystem, part of Oracle VM VirtualBox Guest Additions for Linux guests. It enables mounting of shared folders configured on the host machine into the guest's filesystem, allowing seamless file sharing without networking.

Prerequisites include installing Guest Additions (via Devices menu ISO, then run installer as root) and defining shared folders in VM settings (Devices > Shared Folders or VBoxManage). Folders can be auto-mounted, permanent, or transient.

Basic usage: sudo mkdir /mnt/share
sudo mount.vboxsf sharename /mnt/share
Adjust ownership/permissions with -o options to avoid root-only access, e.g., -o uid=1000,gid=1000.

For persistence, add to /etc/fstab: sharename /mnt/share vboxsf uid=1000,gid=1000 0 0. Unmount with umount /mnt/share. Host permissions apply; guest options fine-tune access.

CAVEATS

Requires root/sudo. VirtualBox Guest Additions and vboxsf kernel module must be loaded. Shared folder must exist in VM config. Host-guest VirtualBox version mismatch may cause failures. Read-only if host sets so.

AUTO-MOUNTING

Use /etc/fstab: sharename /mnt/share vboxsf uid=1000,gid=1000 0 0.

TROUBLESHOOTING

dmesg | grep vboxsf for errors.
Reinstall Guest Additions if module missing: sudo modprobe vboxsf.
Match host/guest versions.

HISTORY

Developed by Sun Microsystems for VirtualBox 1.x (2006+), now Oracle. Evolved with Guest Additions for better Linux kernel support, SMB alternatives, and permission handling.

SEE ALSO

mount(8), umount(8), vboxsf(5), VBoxManage(1)

Copied to clipboard