命令行下安装包:
sudo apt-get install cifs-utils
如果执行不顺利,建议:
sudo apt-get update
如果是nfs挂载,需提前安装包:
sudo apt-get install nfs-common
两种挂载格式的命令:
对于nfs,若需挂载某个ip下的file盘,需要先在本地创建文件夹进行映射,即/nfs/xxx/xxa/file路径需本地存在,命令如下:
sudo mount -t nfs 192.xxxx(服务器ip):/file /nfs/xxx/xxa/file
对于cifs挂载,操作方法和nfs一样,命令有区别:
sudo mount.cifs -o rw,username=xxx,passwd=xxx,file_mode=0777,dir_mode=0777,nobrl //xxxx(ip)/file /nfs/xxx/file