Samba主要用于局域网环境下, linux系统和windows系统共享文件,其搭建步骤如下:
- sudo su
- 创建共享目录 mkdir /home/semie/share
- 更改该目录的权限 chmod 777 /home/semie/share
- install Samba相关 sudo apt-get install samba samba-common
- add a user and set a password sudo smbpasswd -a semie semie为本人用户名
- edit the samba conf sudo nano /etc/samba/smb.conf 在配置文件最后添加如下
[share] comment = share folder browseable = yes path = /home/semie/share create mask = 0700 directory mask = 0700 valid users = semie force user = semie force group = semie public = yes available = yes writable = yes
- restart service sudo service smbd restart
- windows下访问 \\192.168.0.105