Difficulty: ★★☆☆☆
Avoid using NTFS on Linux whenever possible. But if you have no choice, you’ll want to get the most out of it – and that’s exactly why I wrote this.
The main goal of this guide is to provide well-researched NTFS mount options that strike a balance between convenience and reasonable security – suitable for almost anyone. While the rest of the information can be found in countless other guides, the real value here lies in the options themselves and, unlike most NTFS guides, I actually take the time to explain them clearly.
Warning for Dual-Boot Users: If you’re sharing NTFS partitions between Windows and Linux, make sure to disable Windows Fast Startup. Leaving it enabled can cause serious issues with file system integrity and data access.
TL;DR
This is for those who more or less know what they’re doing and just want their NTFS partition working yesterday.
Add one of the following entries to /etc/fstab, making sure to replace someuuid and mountpoint with a valid UUID and an existing empty path.
NTFS3
UUID=someuuid /mountpoint ntfs3 nofail,users,prealloc,windows_names,nocase 0 0
LOWNTFS-3G
UUID=someuuid /mountpoint lowntfs-3g nofail,noexec,windows_names 0 0
NTFS-3G
UUID=someuuid /mountpoint ntfs-3g nofail,noexec,windows_names 0 0
If any of this is unclear or if you’re wondering why these particular drivers and mount options are used – keep reading.
The Drivers
There are 2 different drivers. The kernel space driver and the user space driver on top of the kernel module fuse. There is a third kernel space driver called ntfsplus coming soon as well that is supposed to overcome a lot of the problems the other 2 still have.
Kernel Space
Since Linux v5.15 the ntfs3 driver was introduced and replaced the old reverse-engineered community driver ntfs. With linux v6.9 ntfs was fully removed from the source code.
The open source driver ntfs3, developed by Paragon Software, provides full read and write support in the linux kernel. The commercial version, also developed by Paragon Software, offers additional tools such as mkntfs to create a file system and chkntfs which repairs the file system just like on Windows.
User Space
Since the old reverse-engineered community driver ntfs had very limited write support, the FUSE driver ntfs-3g was born in 2006 and is still maintained by Tuxera. ntfs-3g is based on FUSE, which provides broad compatibility with UNIX-like systems. Though not the fastest, it is still the most reliable and well-tested driver for NTFS. It also provides basic tools for managing the NTFS file system.
lowntfs-3g is exactly the same as ntfs-3g, but it uses the low-level API of FUSE, which removes a lot of overhead and talks more directly to the kernel through FUSE, which is more complex. This speeds up the driver, but sacrifices compatibility. It is not the default and therefore not so well-tested as ntfs-3g. Be aware of possible bugs.
Since the ntfs-3g and lowntfs-3g drivers are not part of the kernel, but a library on top of the FUSE module, they must be installed:
pacman -S ntfs-3g
I generally recommend using ntfs3 as it is the fastest and doesn’t require FUSE, but if you have problems with it, I would try lowntfs-3g next as it is the second fastest.
Mounting
Methods
| Method | Explanation |
|---|---|
/etc/fstab |
Historcially the standard way to mount internal drives permanently on boot time. Modern systems with Systemd like Manjaro parse this file and convert the entries to Systemd-Mount-Units. |
mount/umount |
These commands are used to mount and unmount partitions temporarily. |
| udisks2 | It is a service that provides the ability to mount and unmount partitions as a normal user without root privileges. It is mainly used for external USB devices, as File Manages provides the ability to automatically mount them when plugged in, but it can also be used for internal drives. |
Options
Recommended for ntfs3:
nofail,users,prealloc,windows_names,nocase
Recommended for ntfs-3g & lowntfs-3g
nofail,noexec,windows_names
General options
| Option | Explanation |
|---|---|
| defaults | This option is assumed and doesn’t need to be set unless no other options are used. It combines rw,suid,dev,exec,auto,nouser,async |
rw / ro |
rw is set automatically since it is the default. It means that the drive is mounted readable and writeable. In case of problems the driver can decide to fallback to ro (read-only) for safety reasons. ro can also be set explicitly and overwrite the default rw. |
nofail |
Every entry in /etc/fstab is counted as the root filesystem. If an entry fails to mount or is not available, the boot process is interrupted and you will be dropped to the emergency shell. This option ensures that the boot process will complete even if the drive fails to mount. It is important because of how common issues with ntfs drives are compared to other filesystems on Linux. |
users |
Allows mounting and unmounting by any user, regardless of which user has mounted it first. It also sets noexec,nosuid,nodev if not set otherwise which is why we skip the noexec when using this option. See also: How to mount ntfs-3g as an unprivileged user |
exec / noexec |
exec is set automatically by default. These options determine whether binaries can be executed from this partition at all. This only affects Linux files marked as executable. Windows programs tend to be unaffected by noexec as they are executed with Wine/Proton but there are cases where it can cause crashes or slowdowns. Because NTFS doesn’t support Linux ACL (permissions) when exec is set, every single file on the drive will be marked as executable, this is the reason why we use noexec unless we have a good reason. |
auto / noauto |
auto is set automatically by default. noauto prevents the drive from being automatically mounted. It can replace the nofail option. |
Filesystem specific options
| Option | Driver | Explanation |
|---|---|---|
umask=0000dmask=0000fmask=0000 |
ntfs3 & ntfs-3g |
This is the default and doesn’t need to be set. Higher values reduce the permissions. The highest value is 0777. If you set it to 0022, it will be reduced to 0755, which is the common default for any folder when it is created. Ideally it would be: dmask=0022 → 755 (folders) fmask=0133 → 644 (files) An online calculator can help you understand the numbers. Masking files and folders is only useful if uid and gid are set to your account id. |
| uid=0 gid=0 | ntfs3 & ntfs-3g |
The userID (uid) and groupID (gid) is set automatically to 0, which represents root. Changing it to the number of your account, which you get on the terminal by entering UserID: id -u $USER GroupID: id -g $USER will overwrite ownership when mounting. |
windows_names |
ntfs3 & ntfs-3g |
Files and directories cannot be created with characters or symbols in their names that are not allowed on Windows. |
prealloc |
ntfs3 |
Preallocate space for files excessively when file size is increasing on writes. Decreases fragmentation in case of parallel write operations to different files. |
| iocharset=utf8 | ntfs3 |
Value is set automatically by reading `zcat /proc/config.gz |
locale=C.UTF-8 |
ntfs-3g |
Usually the locale value from your System localisation e.g. the set language. You can get the value from: localectl. If some filenames are unreadable or you disagree with the sorting method, you can set a different locale here. |
nocase |
ntfs3 |
Disables case sensitivity to more closely imitate behavior on windows for increased windows compatibility. |
ignore_case |
lowntfs-3g |
ignore_case renames all files on the drive to lowercase to mimic case insensitivity. |
discard |
ntfs3 |
The kernel driver is able to trim SSDs after files are deleted. You can add this option if you are using an SSD. NTFS-3G is not able to do that due its nature of FUSE. Use the fstrim service by enabling the timer: systemctl enable --now fstrim.timer It will trim detected SSDs weekly. |
Further manuals/documentation:
- https://linux.die.net/man/5/fstab
- https://linux.die.net/man/8/mount
- https://linux.die.net/man/8/ntfs-3g
- https://github.com/tuxera/ntfs-3g/wiki/NTFS-3G-FAQ
- https://www.kernel.org/doc/html/latest/filesystems/ntfs3.html
Method 1: fstab
I’m sure everyone reading this probably already knows this but just to cover the basics.
/etc/fstab is a text file that contains entries that are mounted at boot time. The entries set contain options that are permanent.
Both mount and udisks2 (automount/mounting through file managers) will respect the fstab entries for the associated drive if no other options are specified.
The best way to use fstab is to identify the drive by it’s UUID, since it is unique and random. If you have set a proper LABEL or PARTLABEL, that would also be a good choice. It can also be identified by it’s device path (e.g. /dev/sdx1), but that is unreliable since the device name can change on every boot since generated in parallel. /dev/sda1 could become /dev/sdc1 if more than one drive is available.
Here is an example fstab entry:
UUID=9873-9FFF /efi vfat fmask=0137,dmask=0027 0 2
| Field | Value | Explanation |
|---|---|---|
| Source | UUID=9873-9FFF | There are different ways to target the source, but the UUID is the most reliable one since it’s generated by random unique characters.There is also LABEL= PARTUUID= PARTLABEL= You get this information by entering sudo blkid on the Terminal. |
| Mountpoint | /efi | That must be an existing, empty and unused folder on the root filesystem, where the partition will be mounted. |
| Filesystem / Driver / Module | vfat | Here you need to specify exactly what filesystem you would like to mount. vfat is the kernel module, therefore it is the module and not the file system that must be specified. |
| Options | fmask=0137,dmask=0027 | There are many possible options. Note that all options must be written without spaces, but separated by commas. |
| Dump | 0 / 1 | Old legacy option that has no use on modern systems. When backups were still created on tape drives, this was the possibility to mark a partition for a 1:1 copy and it only supports extFS. Therefore 0. |
| Fsck | 0 / 1 / 2 | It controls whether the filesystem check is done sequentially or in parallel at boot time. If you are using ExtFS for your root filesystem (/), you can set it to 1 (sequentially). Any other additional filesystem should be set to 2 (parallel). Use 1 or 2 only for these filesystems: ext2,ext3,ext4,vfat,reiserfs,f2fs, otherwise set it to 0. Note that it doesn’t repair most of them, it only checks them. |
Short summary
- Open the text file
/etc/fstabwith a text editor of your choice as admin/root. - Find the UUID with
lsblk -f
or
sudo blkid -s UUID -s LABEL -t TYPE="ntfs" - Create an empty mountpoint with:
sudo mkdir -p /media/somename
You can replace the ‘somename’ with whatever you like. - Set the file system setting to the NTFS driver of your choice.
- Then place the options from the options section above after the filesystem setting.
- Add a space and a 0 0 at the end and you’re done.
The end result should look something like this:
UUID=0238A2FE38A2EFB9 /media/somename ntfs3 nofail,users,prealloc,windows_names,nocase 0 0
After writing the entry above, you need to run
systemctl daemon-reload
to apply them to systemd, so you can try them with mount or the file manager right away.
Method 2: mount
The mount command generally works like this:
mount -m -t filesystem -o options /dev/partition /mountpoint
So to replicate the fstab example we do this
mount -m -t ntfs3 -o prealloc,windows_names,nocase --uuid 0238A2FE38A2EFB9 /media/somename
Wasn’t that short and sweet?
Method 3: udisks2
You can mount and unmount block devices e.g. partitions like that on the terminal:
udisksctl mount --filesystem-type=ntfs3 --options=noexec,prealloc,windows_names,nocase --block-device=/dev/disk/by-uuid/someuuid
or the NTFS-3G instead:
udisksctl mount --filesystem-type=ntfs --options=noexec,windows_names --block-device=/dev/disk/by-uuid/someuuid
udisksctl unmount --block-device=/dev/disk/by-uuid/someuuid
If you have an fstab entry for the partition, the options you use with the udisksctl command will be ignored in favor of the fstab options.
If you have set a proper label or partlabel, it would also be reliable to use --block-device=/dev/disk/by-label/somelabel or --block-device=/dev/disk/by-partlabel/somepartitionlabel.
To customise the mount options permanently you can create text file:
File: /etc/udisks2/mount_options.conf
Content:
# Example can be read here: /etc/udisks2/mount_options.conf.example
[defaults]
# Prefer the kernel driver NTFS3 over the user space driver NTFS-3G
ntfs_drivers=ntfs3,ntfs
# Set permanent default mount options for each driver
ntfs:ntfs3_defaults=uid=$UID,gid=$GID,noexec,prealloc,windows_names
ntfs:ntfs_defaults=uid=$UID,gid=$GID,noexec,windows_names
# Below is an example of how settings can be configured for specific devices.
[/dev/disk/by-uuid/1ADE9BB0DE9B82A5]
ntfs_drivers=ntfs3,ntfs
ntfs:ntfs_defaults=uid=$UID,gid=$GID,noexec,windows_names
ntfs:ntfs3_defaults=uid=$UID,gid=$GID,noexec,prealloc,windows_names,nocase
Entries in /etc/fstab for a device will always overrule the default options in /etc/udisks2/mount_options.conf.
If you need to mount internal system drives rather than external or usb drives with this method, you would need to create e.g. modify the polkit rule.
File: /etc/polkit-1/rules.d/50-udisks2.rules
Content:
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
action.id == "org.freedesktop.udisks2.filesystem-mount") &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
This allows system administrators, i.e. users in the wheel group, to mount system partitions as well without a password prompt.
While you can add users or user to the a fstab options to have a similar effect: no password prompt. This is still the old legacy method and should be avoided if possible in favor of the more fine-grained method of polkit when using udisks2.
Troubleshooting
Fixing NTFS partitions that won’t mount
Sometimes your PC loses power, or shuts down on the wrong side of the bed, or maybe your dual-boot Windows isn’t quite as shut down as it says it is…
And now your NTFS partition gives errors when you try to mount it; or it only mounts properly in read-only mode (if you replace the rw option with ro you will mount it in read-only mode, it should always work unless there’s something horribly wrong with the drive).
The proper way to fix this is to run CHKDSK which unfortunately only exists on windows.
To do this you have 3 options:
- Boot into Windows and run chkdsk on the drive there
- Use a Windows virtual machine, passthrough the whole drive to the VM, then run chkdsk on it through the VM.
- Boot from a Windows install USB and run chkdsk through that.
If you’re in too much of a hurry for that or you don’t have access to windows, the best temporary solution is to switch to lowntfs-3g or ntfs-3g as they are often still able to mount the drive as read-write when ntfs3 refuses to do so because they are more tolerant of corruption than ntfs3 (corruption is bad though, and you should fix it with CHKDSK sooner rather than later).
The ugly, quick and dirty alternative if you really want to use ntfs3 and can’t run CHKDSK is to use ntfsfix. Something like sudo ntfsfix /dev/sda1.
ntfsfix doesn’t actually fix anything, it can only fix some very basic problems, reset the journal, clear the dirty bit, clear the bad sectors list, and schedule an NTFS consistency check for the next Windows boot. If your drive has a serious problem, the only way to really fix it is to use CHKDSK, but if it’s just a minor problem, ntfsfix will sometimes help.
For more details on how to run CHKDSK and why to avoid ntfsfix, see the
Common problems & solutions
After booting into Windows (on a dual boot) my NTFS partition fails to mount on Linux!?
You need to disable Fast Startup on windows, it is very strongly recommended to always do this if you are dual-booting. After disabling Fast Startup you should run CHKDSK to fix the issue.
Proton games won’t launch!?
Using a NTFS disk with Linux and Windows
Wine/Proton is crashing!?
Although there are many reasons that can happen, when using the noexec option, memory mapping (mmap) files for execution will be denied which will cause a crash. One way to resolve this is to remove noexec from your options if you’re using it, and/or add exec as the last option in your options line. Alternatively you can run sysctl -w vm.mmap_min_addr=0 which should lead to the program running slower instead of crashing, and if that succeeds and you’re happy with the results, you can set vm.mmap_min_addr=0 in /etc/sysctl.conf to make it permanent.
I installed a Linux native game/app on the NTFS drive and it won’t run!?
It’s better to install Linux native applications on linux-compatible partitions. If you are determined to run Linux native games or applications off the NTFS drive you need to add the exec option and if you’re using it, remove the noexec option.
Trying to unmount gives me a target is busy error
Run lsof /mountpoint to see what programs are currently using the drive.
Contributors: