1.检查更新
apt-get update
apt-get upgrade (耗时很久)
2.安装 samba
apt-get install samba
3. 创建共享文件夹
mkdir 777 /home/share
4. 修改共享文件夹权限
chmod 777 /home/share
5. 编辑smb.conf
vim /etc/samba/smb.conf (先检查vim是否安装,如果没有安装先安装sudo apt-get install vim)
在文档的最后加入
[share]
path=/home/share
available=yes
browseable=yes
public=yes
writable=yes
6.重启samba服务
service smbd restart
7. 访问
windows中,win+r 输入\ip
或在工作组计算机中找到ubuntu主机即可访问
ubuntu中,connect to server smb://ip/即可访问
smbd -F -S 可以检测samba的状态
smbd version 4.5.16-Debian started.
Copyright Andrew Tridgell and the Samba Team 1992-2016
ERROR: smbd is already running. File /var/run/samba/smbd.pid exists and process id 1867 is running.
欢迎光临我的淘宝店:
https://shop113189537.taobao.com/?spm=a211vu.server-web-home.sellercard.15.64f02d58fKtmoz