Linux系统下 Debian、CentOS 7/8 挂载NTFS格式磁盘
Linux挂载NTFS格式硬盘时会报错unknown filesystem type 'ntfs',这时就需要用到第三方的插NTFS-3G来加载NTFS格式硬盘。其中NTFS-3G是一个开源软件,支持在Linux, FreeBSD, Mac OS X, NetBSD, Haiku操作系统下读写NTFS格式的分区。
NTFS-3G介绍
NTFS-3G是一个开源的、免费的读写 NTFS 驱动程序,适用于 Linux、Android、FreeBSD、macOS、NetBSD、OpenIndiana、QNX 和 Haiku和其他操作系统提供的一个稳定的,功能齐全,读写NTFS的驱动程序的。它提供对 Windows XP、Windows Server 2003、Windows 2000、Windows Vista、Windows Server 2008、Windows 7、Windows 8、Windows Server 2012、Windows Server 2016、Windows 10 和 Windows Server 2019操作系统下的 NTFS 文件系统的安全快速处理。

该项目的目的是为用户需要与 NTFS 可靠互操作的硬件平台和操作系统开发、质量保证和支持一个可信赖、功能强大的高性能解决方案。除了这个实际目标之外,该项目还旨在探索混合、内核/用户空间文件系统驱动程序方法、性能、可靠性和功能丰富度的限制。
除了 POSIX 定义的通用文件系统功能外,NTFS-3G 还为与 Windows 的互操作性提供特定支持,从而促进与在 Windows 上运行的应用程序共享数据。
相关链接
- 官方网址:http://www.tuxera.com/
- GitHub项目网址:https://github.com/tuxera/ntfs-3g
- GitHub项目手册:https://github.com/tuxera/ntfs-3g/wiki
- GitHub项目下载:https://github.com/tuxera/ntfs-3g/releases
Debian
Debian自动挂载ntfs硬盘首先下载安装ntfs-3g
apt-get install ntfs-3g
然后查看分区信息
fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 * 1 7490 60163393+ 7 HPFS/NTFS
/dev/sda2 7491 30401 184032607+ f W95 Ext'd (LBA)
/dev/sda5 7491 14980 60163393+ 7 HPFS/NTFS
/dev/sda6 14981 22470 60163393+ 7 HPFS/NTFS
/dev/sda7 22471 28482 48290430 7 HPFS/NTFS
/dev/sda8 28482 30401 15414272 83 Linux
其中sda1 sda5 sda6 sda7分别是我的c d e f 盘。
进许/mnt目录,建立挂载目录
mkdir winc
mkdir wind
mkdir wine
mkdir winf
编辑/etc/fstab文件,进行自动挂载
/dev/sda1 /mnt/winc ntfs-3g default 0 0
/dev/sda5 /mnt/wind ntfs-3g default 0 0
/dev/sda6 /mnt/wine ntfs-3g default 0 0
/dev/sda7 /mnt/winf ntfs-3g default 0 0
这样就完成了ntfs硬盘的自动挂载。
CentOS
需要用到ntfs-3g这个拓展包,这个包在epel源里,所以还需要先安装epel-release。
CentOS 7
yum install epel-release ntfs-3g
CentOS 8
dnf install epel-release ntfs-3g
挂载命令:mount -t ntfs /dev/sdc1 /mnt/usb-hdd
参考资料
- https://www.cnblogs.com/jpfss/p/7463486.html
- https://www.simaek.com/archives/291/
- https://www.linuxprobe.com/centos-7-ntfs-u.html
- https://www.jb51.net/article/103078.htm
- https://jingyan.baidu.com/arti
文章名称:《Linux系统下 Debian、CentOS 7/8 挂载NTFS格式磁盘》
文章链接:https://www.wanjiachupin.com/html/126.html
本站资源仅为个人学、习参考、研究之用,请勿用于商业用途!
版权归原作者所有,请于下载后24小时内删除!否则法律问题自行承担。
推荐阅读