Mount the NTFS file system in CentOS 7 and enable automatic mounting upon startup
In CentOS 7, what should I do if I want to mount the NTFS file system? We need a NTFS-3G tool and compile it and then mount it, that's simple.
First go to the official website to download NTFS-3G tools
Http://www.tuxera.com/community/ntfs-3g-download/
1. decompress the package.
Wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2014.2.15.tgz
Tar-xvf ntfs-3g_ntfsprogs-2014.2.15.tgz
2. Compile and install
Go to the ntfs-3g_ntfsprogs-2014.2.15 folder
./Configure & make install
Ps: If the gcc is not displayed, yum install gcc * installs the compiling environment to execute the preceding command.
The preceding command can also be executed three times.
./Configure
Make
Make install
3. Mount NTFS
Mount-t ntfs-3g/dev/sda2/mnt/Windows
Ps: mount becomes invalid after restart.
4. Enable Automatic NTFS mounting on CentOS 7 (if you do not want automatic mounting, do not do this .)
Change/etc/fstab. Back up cp/etc/fstab. bak
/Dev/sda1/mnt/windows ntfs-3g defaults 0 0
Ps: if you do not know the sda number, you can use fdisk-l to view the partition table. The mount point in/etc/fstab cannot contain spaces. It seems useless even if the space is escaped by \ (it is estimated that the space is not successful). This is my personal experience.
For example, a mount point in fstab is/mnt/Virtual \ Machines, which is saved and restarted and then directly enters the read-only file system. At this time, you cannot modify the content in fstab, run the following command, and then re-run vi.
Mount-n-o remount, rw/Note: There is no space between commas,/there is a space in front.
Then vi fstab deletes the mount point with spaces/mnt/Virtual \ Machines.
If any error occurs, please note that.
Mounting an NTFS hard disk in Linux
Mount Windows NTFS partition with ntfs-3g under CentOS 6.3
Read and Write NTFS format partition in Gentoo Linux (ntfs-3g solves the problem of NTFS read-only and non-writable)
Using NTFS-3G to mount NTFS partition U disk and mobile hard disk in Linux