|
|
茫茫網海中的冷日
發生過的事,不可能遺忘,只是想不起來而已! |
|
恭喜您是本站第 1729835
位訪客!
登入 | 註冊
|
|
|
|
發表者 |
討論內容 |
冷日 (冷日) |
發表時間:2009/5/11 5:24 |
- Webmaster

- 註冊日: 2008/2/19
- 來自:
- 發表數: 15773
|
- [轉貼]mount指令簡介
mount [-ahlV] mount -t type /dev/hdxx /mountpoint mount -o [options] umount /mountpoint 參數說明: -a :依照 /etc/fstab 的內容將所有相關的磁碟都掛上來! -h :只列出 mount 相關的參數,並不掛載任何裝置 -l :列出目前已經掛載的裝置、檔案系統名稱與掛載點! -V :列出 mount 的版本資訊 type :將後面 /dev/hdxx 這個裝置以 type 的檔案格式掛載到 /mountpoint 這個點, 常見的 type 有底下幾個: vfat, msdos :這個是支援 Windows 系統的檔案格式,尤其是 vfat 常用! ext, ext2 :這個就是 Linux 的主要檔案格式啦! iso9660 :光碟機的檔案格式 nfs, ntfs, ufs :Windows 2000 使用 NTFS 格式呀! -o :這個參數後面接的咚咚可多了!可用的資料可不少呢! rw :讓 mount 的磁區為可讀寫 suid :允許該磁區可以設定檔案為 SUID 的狀態! exec :允許該磁區可以執行 binary 的檔案! auto :允許該磁區可以使用 mount -a 的參數設定! nouser :禁止其他人(非 root 之使用者)使用掛載功能!這是預設值!
async :允許磁區可以進行非同步記錄(記憶體與硬碟不同步!最常用!) defaults:同時具有 rw, suid, dev, exec, auto, nouser, async 這些功能的設定值! nosuid :不許該磁區具有 SUID 的檔案屬性! ro :設定為唯讀屬性! remount :讓系統本來掛載的磁區重新被掛載! iocharset=big5,codepage=950』這種額外的功能參數以啟動中文編碼的支援 defaults 同時具有 rw, suid, dev, exec, auto, nouser, async 這些功能,所以預設情況中,使用這個即可! 範例: [root @test /root]# mount -a [root @test /root]# mount -t iso9660 /dev/cdrom /mnt/cdrom<==掛上光碟 [root @test /root]# mount -t vfat /dev/fd0 /mnt/floppy <==掛上 windows 檔案系統的軟碟 [root @test /root]# mount -t ext2 /dev/fd0 /mnt/floppy <==掛上 Linux 檔案系統的軟碟 [root @test /root]# mount -t ext2 /dev/hdc6 /home <==掛上 Linux 檔案格式硬碟 [root @test /root]# mount -o remount,rw / <==讓根目錄重新掛載為可讀! #掛載軟碟 mount -t ext2 /dev/fd0 /mnt/floppy<==Linux 格式
mount -t vfat /dev/fd0 /mnt/floppy<==Windows 格式 umount /mnt/floppy<==將軟碟機卸載 #掛載光碟 modprobe cdrom modprobe ide-cd mount -t iso9660 /dev/cdrom /mnt/cdrom umount /mnt/cdrom #安裝新硬碟 fdisk /dev/hdb ....... (以下省略!直接以 fdisk 分割好硬碟啦!) mke2fs /dev/hdb1 在 Linux 中的 format 是 mke2fs 這一個指令喔! 上面的指令在將你的硬碟磁區格式化成 Linux 的 ext2 格式啦! mkdir /disk2 建立一個目錄名稱為 /disk2 ,預計用來掛載你的新硬碟 mount -t ext2 /dev/hdb1 /disk2 將硬碟掛上 Linux 系統囉! 原文出處:各式磁區的掛載
|
|
討論串
|