1.samba安装
sudo apt-get install samba
2.修改smb.conf
sudo gedit /etc/samba/smb.conf
文件最后增加如下代码:
[share]
path = /home/liunx/share
available = yes
browseable = yes
public = yes
writable = yes
4.进入home/liunx目录创建share文件夹
mkdir /share
chmod 777 /share
5.创建samba用户
sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a liunx
然后输入密码
6.重启samba服务
sudo /etc/init.d/smbd restart
7.查看虚拟机当前的IP地址
ifconfig
查看虚拟机的IP地址,然后本机PC映射网络驱动器 \\192.168.xx.xx\share