1,安装samba
sudo apt-get install samba openssh-server
2,编辑配置文件:
sudo gedit /etc/samba/smb.conf
然后在文件末尾加入下面代码:
[aping] #samba usercomment = Samba server's sharepath = /home/apingavailable = yeswriteable = yessecurity = sharebrowseable = yespublic = yesvalid user = aping #ubuntu user nameforce user = apingcreate mask = 0644force create mask = 0644directory mask = 0755sudo smbpasswd -a aping #ubuntu user namesudo /etc/init.d/smbd restart
然后保存退出。
3,重启samba 服务
sudo /etc/init.d/smbd restart
4,在window 文件管理器右键,弹出菜单添加网络位置,输入\\xxx.xxx.xxx.xxx\共享目录