1. 进入目录
cd /etc/systemd/system/
2.建立一个空配置文件
touch home-disk3-Public-scan.mount
配置内容:直接上代码:
[Unit]
Description= mount a samba share
Requires=network-online.target
After=network-online.target systemd-resolved.service
Wants=network-online.target systemd-resolved.service
[Mount]
What=//192.168.1.168/scan/
Where=/home/disk3/Public/scan
Type=cifs
#下面是samba服务的账号、密码、挂栽权限等配置
Options=username=nobody,password=nobody,dir_mode=0777,rw,file_mode=0777,uid=65534,gid=65534
TimeoutSec=30
[Install]
WantedBy=multi-user.target
3.ipv6 挂载 samba共享