How to format NTFS partition under linux

How to format NTFS partition under linux

By default, Linux cannot format NTFS partitions and needs to install a ntfsprogs tool.
[root@testserver ~]# yum install ntfsprogs
How to format NTFS partition under linux

You can view the command to format ntfs
How to format NTFS partition under linux

Quick format partition:
[root@testserver-bk ~]# mkfs.ntfs -f /dev/sda2
How to format NTFS partition under linux

View the UUID of the partition after formatting
[root@testserver]# blkid

How to format NTFS partition under linux

After obtaining the UUID, you can mount the partition and write it in /etc/fstab
[root@testserver]# mkdir /mnt/ntfs_part
[root@testserver]# ntfs-3g /dev/sda2 /mnt/ntfs_part

If there is no ntfs-3g command, you can install it through yum -y install ntfs-3g.

Then edit /etc/fstab
How to format NTFS partition under linux

Finally restart the computer.
[root@testserver]# reboot -h now

The verification is successful.

Guess you like

Origin blog.51cto.com/2221384/2592293