Ubuntu Samba配置
1. Ubuntu服务器配置
1.1 安装samba
sudo apt install samba samba-common
1.2 创建共享目录并分配权限
sudo mkdit -p /home/$USER/share
sudo chmod 777 /home/$USER/share
1.3 配置samba
sudo gedit /etc/samba/smb.conf
在文件末尾添加共享配置:
[share]
comment = Ubuntu Shared Folder
path = /home/$USER/share
browseable = yes
guest ok = yes
read only = no
create mask = 0777
directory mask = 0777
1.4 设置samba用户(可选)
sudo smbpasswd -a $USER
1.5 启动samba服务
sudo systemctl start smbd
1.6 设置开机自启动
sudo systemctl enable smbd
2. Windows访问共享文件夹
2.1 方法一:文件夹地址栏输入ubuntu的IP地址进行访问
// 192.168.xxx.xxx