NTFS (New Technology File System),是Windows NT家族(如,Windows 2000、Windows XP、Windows Vista、Windows 7和 windows 8.1)等的限制级专用的文件系统,针对FAT和HPFS作了若干改进,例如,支持元数据,并且使用了高级数据结构,以便于改善性能、可靠性和磁盘空间利用率,并提供了若干附加扩展功能。属于商业的文件系统。Linux 默认不支持,但是我们可以通过ntfs-3g 来使Linux 识别 NTFS 并进行读写。
1.官方关于ntfs-3g 的介绍:NTFS-3G is a stable, full-featured, read-write NTFS driver for Linux, Android, Mac OS X, FreeBSD, NetBSD, OpenSolaris, QNX, Haiku, and other operating systems. It provides safe handling of the Windows XP, Windows Server 2003, Windows 2000, Windows Vista, Windows Server 2008, Windows 7 and Windows 8 NTFS file systems. A high-performance alternative, called Tuxera NTFS is available for embedded devices and Mac OS X.
【参考】
1.http://www.tuxera.com/community/open-source-ntfs-3g/
2.http://www.blogjava.net/freeman1984/archive/2013/05/17/399427.html
3. http://blog.csdn.net/hotday_kevin/article/details/6873162
【流程】
1.wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz
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
【附录】
来源:http://www.tuxera.com/community/open-source-ntfs-3g/
Installation
Linux: Most distributions includeand use NTFS-3G by default. Please use that one unless it’s anoldversion. 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 NTFS-3GManual 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