1、在虚拟机中:安装samba服务
在终端中输入sudo apt-get install samba
输入用户密码
2、备份samba服务的配置文件/etc/samba/smb.conf
我这里的备份文件是bak_smb.conf
3、sudo修改smb.conf,在最后添加脚本配置
# set the samba server
# make the comunication between VM_linux and Windows
[zhou]
comment = share
path = /home/zhou/
writable = yes
browseable = yes
available = yes
public = yes
security = share
force user = zhou
path = 在虚拟机中共享文件夹的绝对路径
4、重启samba有关服务
#命令行输入
sudo /etc/init.d/smbd restart
sudo /etc/init.d/nmbd restart
5、windows映射网络驱动器