Linux中samba安装与使用
-
使用apt-get install samba进行安装
-
vi /etc/samba/smb.conf
-
在smb.conf后面加上如下内容,我的是加了两个路径(根据自己的共享目录改变path路径即可,comment可有可无,其余不用变)
[root]
comment = this is linux share directory root
path = /root/share/
public = yes
browseable = yes
writable = yes[home]
comment = this is linux share directory
path = /home/linux/share/
public = yes
browseable = yes
writable = yes
“/etc/samba/smb.conf” 274L, 9779C -
在配置完Samba后,再重启service smbd restart
-
最后再添加一个网络适配器(仅主机模式),
-
在window中资源管理器输入仅主机模式的ip地址:\192.168.xxx.xxx