Linux mount命令系統(tǒng)掛載與鏡像處理
向大家介紹Linux mount命令的使用方法與應(yīng)用很有學(xué)習(xí)價值,這里我主要講解Linux mount命令的應(yīng)用,包括介紹Linux mount命令知識等方面。Linux mount命令(用來掛載硬盤或鏡像等)。
用法:Linux mount命令 [-t vfstype] [-o options] device dir1.-t vfstype 指定文件系統(tǒng)的類型,通常不必指定。Linux mount命令 會自動選擇正確的類型。常用類型有:
光盤或光盤鏡像:iso9660
DOS fat16文件系統(tǒng):msdos
Windows 9x fat32文件系統(tǒng):vfat
Windows NT ntfs文件系統(tǒng):ntfs
Mount Windows文件網(wǎng)絡(luò)共享:smbfs
UNIX(LINUX) 文件網(wǎng)絡(luò)共享:nfs
2.-o options 主要用來描述設(shè)備或檔案的掛接方式。常用的參數(shù)有:
loop:用來把一個文件當(dāng)成硬盤分區(qū)掛接上系統(tǒng)
ro:采用只讀方式掛接設(shè)備
rw:采用讀寫方式掛接設(shè)備
iocharset:指定訪問文件系統(tǒng)所用字符集
3.device 要掛接Linux mount命令的設(shè)備。
4.dir設(shè)備在系統(tǒng)上的掛接點(mount point)。 3 monut 遠(yuǎn)程或本機的windows分區(qū)之NTFS格式支持:
1)根據(jù)內(nèi)核安裝ntfs支持模塊:http://sourceforge.net/projects/linux-ntfs/files/
具體的過程幫助:http://gerardmcgarry.com/blog/hacking-centos-ntfs-support
實例:sudo mount -t cifs //remotehostname/shared /mnt/myshared -o username=XXX,password=XXX
2)安裝ntfs-3g----- yum install ntfs-3g(fuse-ntfs-3g)
參考:http://www.zzdushi.com/?p=30
參考:http://ntfs-3g.org/
具體過程幫助:http://wiki.centos.org/TipsAndTricks/NTFS
實例:mount -t ntfs-3g /dev/sda1 /mnt/windows(umount /mnt/windows)
3 實例:
Linux mount命令掛載本機的iso:mount -o loop -t iso9660 /home/sunky/mydisk.iso /mnt/vcdrom掛載遠(yuǎn)程的fat32的共享目錄:mount //10.167.20.20/shared /mnt/mywinshareWindows 的C分區(qū)掛到Liunx的/mnt/winc目錄下: mount -t vfat /dev/hda1 /mnt/winc ,如果中文顯示有問題:#mount -t vfat -o iocharset=cp936 /dev/hda1 /mnt/winc。(要掛載本地的windows分區(qū),在ubuntu下使用命令sudo fdisk -l 來查看磁盤分區(qū)情況。)當(dāng)插入閃盤后,閃盤被識別為一個SCSI盤,通常輸入以下命令:mount /dev/sda1 /usb
【編輯推薦】