亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

linux mount掛載共享目錄詳解

 更新時間:2017年03月14日 09:40:17   作者:lym6520  
本篇文章主要介紹了linux mount掛載共享目錄詳解,詳細(xì)的介紹mount命令的使用,具有一定的參考價值,有興趣的可以了解一下。

掛載windows共享目錄或FTP:

方式一:包含密碼

復(fù)制代碼 代碼如下:

sudo mount //192.168.10.22/FTPServer /windows -o username=user,password=abcdefg -t cifs 

方式二:密碼單獨輸入

sudo mount //192.168.10.22/FTPServer /windows -o username=user -t cifs 
password:abcdefg 

卸載:

umount /FTPServer 

掛載linux共享目錄:

【修改server端】

修改/etc/export文件,加入:

/home/user/source *(rw) 

執(zhí)行如下命令是新增的共享生效

$/etc/rc.d/init.d/nfs restart 

【客戶端】執(zhí)行如下命令掛載共享:

mount -t nfs -o rw 192.168.10.94:/home/user/source /home/user/target 

設(shè)置開機啟動自動掛載

1、修改mount_AtoB.sh的密碼

2、將mount_AtoB.sh文件放到/home/user目錄下

3、改變文件的執(zhí)行權(quán)限,執(zhí)行如下命令:

chmod 777 mount_AtoB.sh 

4、將文件加入到啟動文件中:

$ echo /home/user/mount_94to93.sh >> /etc/rc.d/rc.local 

mount_AtoB.sh文件內(nèi)容,其中abcdefg為192.168.10.94的密碼:

set fileformat=unix 
#!bin/bash 
mount -t nfs -o rw 192.168.10.94:/home/user/source /home/user/target <<EOF 
abcdefg 
EOF 

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論