
Ubuntu挂载及开机自动挂载网络位置
手动挂载
在需要挂载的位置创建文件夹
sudo mkdir mountdir
执行:
sudo mount -t cifs -o username=用户名,password=密码 //192.168.1.2/名 mountdir所在位置
如果报错:无法以只读方式挂载,则需要安装cifs-utils。
sudo apt install cifs-utils
开机自动挂载
编辑/etc/fstab文件
sudo vim /etc/fstab
将下面的代码添加到该文件末尾:
//192.168.1.2/名 mountdir所在绝对路径 cifs username=用户名,password=密码 0 0
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果