centos7 掛載fat32格式的u盤和ntfs格式的移動硬碟

來源:互聯網
上載者:User

centos7 掛載fat32格式的u盤和ntfs格式的移動硬碟

我們知道,預設情況下,u盤的檔案格式為FAT32格式,而移動硬碟位NTFS格式,兩種格式不相同,因此在centos7系統下的掛載方式也不相同。下面分別來介紹:

1.掛載fat32格式的u盤

1.插入u盤,查看u盤裝置檔案名稱

[root@localhost ~]# fdisk -l


可以看出,我的u盤在這台機器上的裝置檔案名稱為/dev/sdc,因為我已經有兩塊硬碟分別為/dev/sda和/dev/sdb了。

2.建立一個掛載點,一般要在/mnt下建立

[root@localhost mnt]# mkdir /mnt/usb

3.掛載

[root@localhost mnt]# mount -t vfat /dev/sdc1 /mnt/usb

進入/mnt/usb目錄,可以看到u盤裡的內容了,搞定!

4.拔出u盤前要記得卸載

[root@localhost ~]# umount /mnt/usb#或者[root@localhost ~]# umount /dev/sdc1

註:不能再usb目錄內卸載,會顯示正忙,要在其他目錄下卸載u盤。

2.掛載NTFS格式的移動硬碟

預設情況下,linux是不支援NTFS格式的,所以要先安裝一個外掛程式NTFS-3G

1.下載NTFS-3G外掛程式 http://www.tuxera.com/community/ntfs-3g-download/

2.安裝NTFS-3G

#解壓[root@localhost ~]# tar -zvxf ntfs-3g_ntfsprogs-2013.1.13.tgz  #進入解壓目錄[root@localhost ~]# cd ntfs-3g_ntfsprogs-2013.1.13/#編譯準備,沒有指定安裝目錄,安裝到預設位置中[root@localhost ~]# ./configure#編譯[root@localhost ~]# make#編譯安裝[root@localhost ~]# make install

3.插入移動硬碟,查看移動硬碟的裝置檔案名稱

[root@localhost ~]# fdisk -l

4.在/mnt目錄下建立一個掛載點

[root@localhost ~]# mkdir /mnt/HardDisk

5.掛載

[root@localhost HardDisk]# mount -t ntfs-3g /dev/sdc1 /mnt/HardDisk/

進入/mnt/HardDisk目錄,可以看到移動硬碟裡的內容了,搞定!

6.拔出移動硬碟前要記得卸載 [root@localhost ~]# umount /mnt/HardDisk/


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.