1
2
| sudo apt update
sudo apt install samba
|
硬盘将要挂载的目录 mkdir /home/<username>/sambashare/
确定挂载的硬盘:
把硬盘挂载到刚刚创建的目录
1
| sudo mount /dev/sdb1 home/<username>/sambashare/
|
检查是否挂载成功 lsblk
编辑 sudo vim /etc/samba/smb.conf
1
2
3
4
5
| [sambashare]
comment = Samba on Ubuntu
path = /home/username/sambashare
read only = no
browsable = yes
|
创建smb用户
Note:
Username used must belong to a system account, else it won’t save
1
| sudo smbpasswd -a username
|
1
| sudo service smbd restart
|
Install and Configure Samba | Ubuntu
linux局域网共享文件夹和个人家庭影院搭建 - 知乎 (zhihu.com)