linux下mount與umount用法

來源:互聯網
上載者:User

標籤:style   http   使用   io   檔案   ar   代碼   html   

linux系統中常見分區載入方法:

mount掛載iso檔案:
#mkdir /mnt/iso1
#mount –o loop linuxsetup.iso /mnt/iso1

在linux 不需要虛擬光碟機,就可以直接讀取iso檔案了。

mount掛載光碟機系統
一般來說CDROM的裝置檔案是/dev/hdc,使用方法:
如果檔案中含有中文檔案名稱或者檔案夾名全部顯示為?,而英文顯示正常,我們可以通過加入一些參數讓它顯示中文。此時輸入命令如下:
#mkdir /mnt/cdrom
#mount /dev/hdc /mnt/cdrom –o iocharset=cp936

預設不指定光碟機系統,可以自動搜尋得到,將編碼指定為中文。

在linux掛載命令mount的用法中,我們有過介紹,大家可以參考下。

mount掛載軟碟機
# mkdir /mnt/floppy
# mount /dev/fd0 /mnt/floppy

預設不指定檔案系統,可以自動搜尋得到

mount掛載windows共用檔案(samba)

#mkdir /mnt/winshare
#mount -t smbfs -o username=w,password=w,codepage=936,iocharset=gb2312 //192.168.0.101/share /mnt/winshare

指定訪問共用的使用者名稱,密碼,codepage指定編碼與iocharset同意義。這裡的windows 系統是中文簡體。

codepage指定檔案系統的字碼頁,簡體中文中文代碼是936;iocharset指定字元集,簡體中文一般用cp936或gb2312

mount掛載u盤 (www.jbxue.com 指令碼學堂)
如果電腦沒有其它SCSI裝置和usb外設的情況下,插入的隨身碟的裝置路徑是 /dev/sda1,用命令:
#mkdir /mnt/upan
#mount /dev/sda1 /mnt/upan

掛載即可。

mount掛載nfs系統
與windows共用串連差不多。需要正確佈建服務端的nfs服務。然後通過用戶端的:showmount -e 192.168.0.30 可以查看串連。
mount -t nfs 192.168.0.30:/tmp /mnt/nfs

umount卸載檔案系統
umount dir

如上面:
umout /mnt/upan
或者
umount /dev/sda1

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.