Linux中安装Samba实现共享,Ubuntu为例:
安装:sudo apt-get insall samba smbfs
创建共享目录:mkdir /home/phinecos/share
sudo chmod 777 /home/phinecos/share
配置:sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo gedit /etc/samba/smb.conf
在smb.conf最后添加
[share]
path = /home/phinecos/share
available = yes
browsealbe = yes
public = yes
writable = yes
创建账户:
sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a phinecos
重启服务:sudo /etc/init.d/samba restart
测试:smbclient -L //localhost/share
使用:可以到windows下输入ip使用了,在文件夹处输入 "\\" + "Ubuntu机器的ip或主机名" + "\\" + "share"