Working with NTFS in Linux

In Linux, you could not by default view or modify NTFS partitions. To access NTFS permission, you have some options to go around it, but the following method seems to be the easier way to finish the problems. The method is to install NTFS-3G application. It will help you to mount a NTFS partition as usual.

1/ Install Remi repo

First, you need to install a Remi repo to Linux, and we can go from there with yum command.

For CentOS 5.x
wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
sudo rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

For CentOS 6.x
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Okay, you finished installing two repo files, you need to enable remi repo

Check remi repo
# vim /etc/yum.repos.d/remi.repo

Make sure the [remi] part is enabled and has the value as 1

Enable remi repo

2/ Install NTFS-3G

NTFS-3G allows you to work with NTFS partitions in Linux. Install NTFS-3G using yum command

Install NTFS-3G
# yum install ntfs-3g

[[email protected] tmp]# yum install ntfs-3g
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.lstn.net
* epel: fedora-epel.mirror.lstn.net
* extras: mirror.raystedman.net
* remi: remi-mirror.dedipower.com
* updates: mirror.raystedman.net
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package ntfs-3g.x86_64 2:2011.4.12-5.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
Package Arch Version Repository Size
=======================================================================================================
Installing:
ntfs-3g x86_64 2:2011.4.12-5.el6 epel 247 k

Transaction Summary
=======================================================================================================
Install 1 Package(s)

Total download size: 247 k
Installed size: 624 k
Is this ok [y/N]: y

3/ Mount NTFS partitions

Use fdisk utility to find out which drive is NTFS, and what it is

Find NTFS disk
# fdisk -l | grep NTFS

You should see something like /dev/sdb1

[[email protected] ntfs]# fdisk -l | grep NTFS
/dev/sdb1 * 1 3892 31256544+ 7 HPFS/NTFS

Create a folder under /mnt folder

Create new folder
# mkdir /mnt/ntfs

Load the fuse driver
Load fuse driver
# modprobe fuse

And mount NTFS device to that folder
Mount NTFS partition
# mount -t ntfs-3g /dev/sda1 /mnt/ntfs

So, from now, you can do anything with that NTFS disk, create files, or do anything, etc.

About The Author

Hao Nguyen

Hao Nguyen

Hello! I'm Hao Nguyen and I'm currently working as a Network Engineer for a small firm in Houston. I enjoy writing technical documents and blog, such as PlanTutorials.com

Leave a Reply