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
[samba_share]
comment = share
path = /home/zhoupeng/lab
writable = yes
browseable = yes
available = yes
public = yes
security = share
force user = root
path = 在虛擬機中共享文件夾的絕對路徑
4、重啓samba有關服務
#命令行輸入
sudo /etc/init.d smbd restart
sudo /etc/init.d nmbd restart
5、windows映射網絡驅動器