[Topic DIscussion] Deepin挂载共享文件夹
Tofloor
poster avatar
xww5
deepin
2022-07-08 02:08
Author

Deepin用sudo mount -t cifs -o挂载共享文件夹以后,挂载也成功了。但是重启电脑以后,又得重新挂载,能否有办法,让挂载成功以后,就一直挂载着。向windows设置挂载好了以后,开机以后自动识别。

Reply Favorite View the author
Comments
poster avatar
正直笔尖
2022-07-08 04:49
Deepin共享文件夹最简单了。鼠标放置指定的文件夹右键菜单看看有没有共享菜单?然后打勾打勾就行了。你们看看楼下回复的,就是把简单的事复杂化,把小白们搞的云里雾绕。
All Replies
xww5
deepin
2022-07-08 02:21
#1

sudo mount -t cifs -o username=xxx,password=xxx,uid=1000 //192.168.0.1/D /Software/D

只能是单次的,重启电脑就没了.

Reply View the author
Comments
正直笔尖
2022-07-08 04:57
右键选择共享文件夹,打钩,允许匿名访问 ,就这么简单。
xww5
deepin
2022-07-08 02:42
#2

截图_滚动截图_20220707184056.png

1、新建/etc/rc.local 文件。
sudo dedit /etc/rc.local

2、粘贴以下模板:
#!/bin/sh -e

rc.local

This script is executed at the end of each multiuser runlevel.

Make sure that the script will "exit 0" on success or any other

value on error.

In order to enable or disable this script just change the execution

bits.

By default this script does nothing.

exit 0

3、在exit 0 上方插入你需要自启的命令(一行一个)后保存文件,我所需要追加的命令是:
mount -t cifs -o username=xx,password=xxx,dir_mode=0777,file_mode=0777 //192.168.0.1/D /Software/D

(注意:两个0777是给你挂载的文件夹有读写权限,毕竟是共享盘嘛)

代码如下:
#!/bin/sh -e

rc.local

This script is executed at the end of each multiuser runlevel.

Make sure that the script will "exit 0" on success or any other

value on error.

In order to enable or disable this script just change the execution

bits.

By default this script does nothing.

mount -t cifs -o username=xx,password=xxx,dir_mode=0777,file_mode=0777 //192.168.0.1/D /Software/D

exit 0

4、给你编写的脚本加上777权限:
sudo chmod +755 /etc/rc.local

5、可以调试一下自己的脚本是否成功:
sudo /etc/rc.local

Reply View the author
正直笔尖
deepin
2022-07-08 04:56
#3
xww5

sudo mount -t cifs -o username=xxx,password=xxx,uid=1000 //192.168.0.1/D /Software/D

只能是单次的,重启电脑就没了.

右键选择共享文件夹,打钩,允许匿名访问。

Reply View the author
谢克辉
deepin
2022-07-08 05:10
#4

内网挂载吗,现在可以呀

截图_选择区域_20220707210934.jpg

Reply View the author