Use virtualbox7.0 to set up shared folders under windows in detail, absolutely easy to use

1. Open the virtualbox software, click Settings-"Storage-"Controller-"New virtual optical drive, as shown in the figure below

Insert image description here

2. Restart virtualbox. You can use the enter key to restart. A small window will pop up. In the small window, click Device->Install Enhanced Functions.
Insert image description here

After clicking, enter the linux terminal, switch to the root user, and execute the following command


mkdir /cdrom 

# 安装新增功能后会在虚拟机内部出现 dev/cdrom 虚拟磁盘,并挂载到/cdrom下
sudo mount /dev/cdrom /cdrom

# 安装增强功能
cd /cdrom
sudo sh ./VBoxLinuxAdditions.run

# 安装完成后,重启Linux系统,或者执行以下命令来加载vboxsf模块:
sudo modprobe vboxsf

3. Configure shared folders
Insert image description here

4. Mount directory

# 使用以下命令来挂载共享文件夹
sudo mount -t vboxsf <共享文件夹名称> <挂载点>
sudo mount -t vboxsf shareFolder /mnt/winshare

At this point, the shareFolder folder under Windows and /mnt/winshare in the virtual machine are shared.

The shareFolder folder under windows is shared with /mnt/winshare in the virtual machine**

Guess you like

Origin blog.csdn.net/superzhang6666/article/details/132848908