If you dual-boot Windows 11 and Ubuntu Linux on the same physical PC, or if you plug an external Windows hard drive into your Linux server, you will immediately notice a major problem. While Linux can usually “see” the Windows drive and read the files on it, it will often completely refuse to let you edit, delete, or write new files to the drive. You are locked in “Read-Only” mode.
This happens because Windows formats its drives using the proprietary NTFS file system. To gain absolute, permanent read/write control over a Windows drive from within Linux, you must explicitly define the mount parameters using the ntfs-3g driver and bake those instructions into the Linux kernel’s boot file (/etc/fstab).
Step 1: Find the Drive’s UUID
You must never mount a drive using its temporary hardware label (like /dev/sdb1), because if you plug a USB stick in tomorrow, the labels might swap, causing your server to crash on boot. You must use the drive’s permanent, unique mathematical ID (the UUID).
- Open a Terminal.
- Run the block identifier command as root:
sudo blkid - Look through the output to find your Windows drive (it will likely be labeled
TYPE="ntfs"). - Copy the long string of numbers and letters inside the quotation marks next to UUID= (e.g.,
1A2B3C4D5E6F7G8H). Do not copy the quotes themselves.
Step 2: Create a Mount Point
Linux needs a physical, empty folder to attach the drive to.
- Create a folder in the standard media directory. We will call it “windows_data”:
sudo mkdir -p /media/windows_data
Step 3: Edit the fstab File
The /etc/fstab (File System Table) file is the absolute authority on how Linux handles hard drives during the boot sequence.
- Open the file in a text editor:
sudo nano /etc/fstab - Use the arrow keys to scroll to the very bottom of the document. Do not touch any existing lines.
- Paste the following line, replacing the UUID with the one you copied in Step 1:
UUID=1A2B3C4D5E6F7G8H /media/windows_data ntfs-3g defaults,uid=1000,gid=1000,umask=022 0 0
Understanding the Magic String
ntfs-3g: This explicitly commands the kernel to use the open-source driver capable of writing to Windows drives, bypassing the read-only default.uid=1000,gid=1000: This assigns total ownership of the Windows drive to your primary Linux user account (which is almost always ID 1000). Without this, the root account would own the drive, and you still wouldn’t be able to edit files.
- Press Ctrl+O then Enter to save the file. Press Ctrl+X to exit.
Step 4: Mount the Drive
Instead of rebooting your computer, you can command Linux to instantly read the new fstab file and execute the mount instructions.
sudo mount -a
If the command returns no output, it was successful. You can now navigate to /media/windows_data. You will find that you have total, unrestricted read and write access to your entire Windows hard drive directly from Linux, and the drive will automatically reconnect perfectly every single time you reboot the machine.