NTFS stands for New Technology File System and is developed by Microsoft for use on their Windows operating systems. NTFS is not normally used on Linux systems, but has been the default file system on Windows for many years. Linux users are probably used to seeing drives with the ext4 file system, which is ordinarily the default and certainly the most widespread in the Linux realm.
Although NTFS is a proprietary file system meant especially for Windows, Linux systems still have the ability to mount partitions and disks that have been formatted as NTFS. Thus a Linux user could read and write files to the partition as easily as they could with a more Linux-oriented file system. This may come in handy if you need to troubleshoot problems for a Windows-formatted disk, or if you recover a disk from a Windows machine and want to read its contents.
In this tutorial, we’ll show command line examples of how to mount NTFS partitions on any Linux distribution. This will include examples for mounting with only read access, or read and write access, as well as temporary mounting or persistent mounts that will survive future reboots. Keep reading and we will teach you how.
In this tutorial you will learn:
- How to install ntfs-3g and fuse on all major Linux distros
- How to mount NTFS formatted partition on Linux
- How to persistently mount NTFS partition
- How to mount NTFS partition with read only and read and write access
|Category||Requirements, Conventions or Software Version Used|
|System||Any Linux distro|
|Other||Privileged access to your Linux system as root or via the
|Conventions||# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Install ntfs-3g and fuse
Linux systems rely on a software package called “ntfs-3g” in order to have the ability to mount NTFS formatted hard drive partitions. This works along with “fuse”, and both of these packages are very likely to already be installed on your system by default. We’ve tested numerous distributions and all of them came with the native ability to mount NTFS partitions because they already have these packages installed.
Just to cover all our bases, you can use the appropriate command below to check if the ntfs-3g and fuse software, along with their dependencies, are installed on your system. If they aren’t, they will be installed when you execute this command. And if the packages have fallen out of date, they will be updated.
$ sudo apt update $ sudo apt install ntfs-3g fuse
$ sudo dnf install ntfs-3g fuse
$ sudo pacman -S ntfs-3g fuse
Mount NTFS partition on Linux
After installing ntfs-3g (or verifying that it’s already installed), you can use the following command line examples to mount an NTFS formatted partition on your system. Use whichever commands you find most appropriate for your scenario.
In the examples below, our NTFS partition is accessible through
/dev/sdb, and we will be mounting it to the
/mnt/ntfs directory. Use the
parted command if you need to identify the path through which your NTFS partition is accessed.
$ sudo parted -l
Then, create the path where you plan to mount the partition, if it hasn’t already been created.
$ sudo mkdir -p /mnt/ntfs
- The most basic mount command would look like this. It should mount your NTFS partition with read and write permissions. This is probably the only command that most users will need.
$ sudo mount -t ntfs /dev/sdb /mnt/ntfs
To verify the mount and the permissions that it has, use the
$ mount | grep ntfs
- Of course, you can unmount the NTFS partition at any time by executing the
$ sudo umount /mnt/ntfs
- To mount the NTFS partition with read only permissions, use the following
$ sudo mount -o ro -t ntfs /dev/sdb /mnt/ntfs
- To specify that the NTFS partition should have read and write permissions (in case your system is mounting with read only by default), you can use this command.
$ sudo mount -o rw -t ntfs /dev/sdb /mnt/ntfs
Mount NTFS partition automatically
To make the NTFS partition mount automatically each time the computer boots up, we’ll need to add a line to the
/etc/fstab file on our system. Use nano or your favorite text editor to open it up under root permissions.
$ sudo nano /etc/fstab
Then, add the following line to the file, while substituting your own device directory and mount path.
/dev/sdb /mnt/ntfs ntfs defaults 0 0
After you’ve made that addition, save the file and close it. To activate the new change right away, you can execute the following command.
$ sudo mount -a
Otherwise, the partition will mount automatically upon the next system reboot.
In this guide, we saw how to mount an NTFS formatted partition on any major Linux distribution. This is facilitated by the ntfs-3g and fuse software packages, which are normally installed by default on most systems. Other than this requirement, mounting and accessing NTFS partitions is mostly the same process as any other type of disk. This will give users access to files that once belonged to a Windows computer.
A user may find themselves mounting an NTFS drive in cases where they must perform file recovery on a Windows-formatted disk. Other cases might include if they need to read an external or portable hard disk, which has been formatted with NTFS. Even after using the NTFS disk on your Linux system, it should still work fine when it goes back into a Windows computer, provided there was nothing wrong with it in the first place.