1. 程式人生 > >【親測】centos7下掛載ntfs檔案系統型別的行動硬碟

【親測】centos7下掛載ntfs檔案系統型別的行動硬碟

【親測】centos7下掛載ntfs檔案系統型別的行動硬碟

【參考】

【流程】

2.解壓,配置,編譯,安裝

$tar zxvf ntfs-3g_ntfsprogs-2017.3.23.tgz

$ cdntfs-3g_ntfsprogs-2017.3.23/

#./configure

#make

#make install

3.使用

一定要搞清楚自己的行動硬碟對應的裝置,否則掛載失敗!!!

檢視裝置

#fdisk -l

自己的行動硬碟對應裝置/dev/sdc1

開始掛載

# mount -t ntfs-3g /dev/sdc1 /mnt/windows

現在進入/mnt/windows目錄,即是行動硬碟的根目錄

特別注意:以下步驟儘量不要操作,因為一旦你設定了開機自動掛載的話,在你開機重啟的過程中,如果你的行動硬碟沒有連線到電腦的話,會導致系統無法正常啟動!因為啟動過程中,它會執行/etc/fstab檔案內的內容,但是你的行動硬碟又恰好沒有連線的話,執行你新增的掛載語句就會出錯,導致無法正常進入系統!

如果想要開機自動掛載的話,可以編輯/etc/fstab檔案

# vi/etc/fstab

在檔案末尾新增一行

/dev/sda1 /mnt/windowsntfs-3g defaults 0 0

【附錄】

Installation

Linux: Most distributions includeand use NTFS-3G by default. Please use that one unless it’s an. If you wish to install NTFS-3G fromthe source code then make sure you have installed the basicdevelopment tools (gcc compiler, libc-dev libraries). Then type:

./configuremakemakeinstall # or 'sudo makeinstall' if you aren't root

Non-Linux: Please see the OS specific installationand source packages above.

Usage

If there was no error duringinstallation then the NTFS volume can be mounted in read-write modefor everybody as follows. Unmount the volume if it had already beenmounted, replace /dev/sda1 and /mnt/windows, if needed.

mount -t ntfs-3g /dev/sda1/mnt/windows

Please see the for more options and examples.

You can also make NTFS to bemounted during boot by adding the following line to theendof the /etc/fstab file:

/dev/sda1 /mnt/windowsntfs-3g defaults 0 0