Raspberry Pi 4/引导时装载网络

2024-09-30 08:28:56 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要使用我的Pi 4(最新Buster)访问网络驱动器。这也可通过终端通过以下命令工作:

sudo mount -t cifs -o username=xxx@root.lan,password=xxxxxx //xxshr9.root.lan/daten /home/pi/mnt

现在,我希望在启动时,整个程序都能自动运行。 不幸的是,这不起作用。 到目前为止,我已经尝试了以下方法,但没有成功:

  • 在“/etc/rc.local”中插入上述命令
  • 创建一个调用.sh文件的服务
  • 我还将以下行添加到“/etc/fstab”:

//xxshr9.root.lan/daten /home/pi/mnt cifs username=xxx@root.lan,password=xxxxxx 0 0

有人有什么想法吗


Tags: 命令homepietcusernamerootpasswordxxx

热门问题