环境:ubuntu server 24.04
步骤如下:
sudo apt update
sudo apt install samba修改配置文件:
sudo vi /etc/samba/smb.conf新增内容:
[username]path = /home/[username]available = yesvalid users = [username]read only = nobrowsable = yespublic = yeswritable = yes将 username 换成自己的账户名即可设置密码:
sudo smbpasswd -a [username]重启 samba
sudo systemctl restart smbd
然后在 windows 新增一个网络位置: