10

How to Mount and Access Windows NTFS Drives in Linux

 2 years ago
source link: https://www.makeuseof.com/mount-ntfs-windows-drives-in-linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to Mount and Access Windows NTFS Drives in Linux

Published 11 hours ago

Windows drives aren't mounted automatically when you log in on Linux. But that doesn't mean you can't access those NTFS drives at all.

inside of a hard disk

If you are rocking a dual-boot setup with Windows and Linux, you might want to access data stored in the Windows drives from the Linux system.

However, you might find that Windows drives do not appear in the file manager. This is because, in some distros, you need to manually mount them. Let's take a look at how you can access your NTFS/Windows drives in Linux.

Step 1: Install the NTFS-3G Driver

To successfully mount and access NTFS drives on Linux, you will need to install a driver to ensure no incompatibility issues arise. The go-to driver when working with NTFS drives is NTFS-3G. It's cross-compatible between Debian/Ubuntu derivatives, Arch Linux-based systems as well as RHEL/CentOS/Fedora systems.

To install the NTFS-3G driver on your Linux system, fire up a terminal and install it using the package manager of the distro that you're running:

On Debian and Ubuntu, run:

sudo apt install ntfs-3g

On Arch-based systems, run:

sudo pacman -S ntfs-3g

To install the NTFS-3G driver on Fedora, CentOS, or RHEL, issue the following command:

sudo dnf install ntfs-3g

This should install the driver on your Linux system. Now you can move on to the next steps.

Step 2: Identify the NTFS Partition

output of the fdisk -l command

A preliminary step before mounting a drive is to first identify its device ID. This is important because you might end up causing unwanted data loss by working with the wrong partition or drive.

To identify all the drives and their partition types, use the fdisk command with the -l flag.

sudo fdisk -l

The output will display all the different drives and partitions along with useful information like size, available free space, partition type, and more. Take note of the device name carefully. You will be needing it later on in this guide.

Step 3: Make a Directory to Mount the Drive

In Linux, everything is treated as a file, including hardware devices. So, to mount your NTFS drives on Linux, you have to create a separate directory wherein the drive will be mounted, and its content laid out.

This process is as simple as creating a regular directory on Linux. Using the mkdir command, create a new directory in the root partition of your Linux system. For the sake of better organization, make the directory under the /mnt directory and name it "media".

sudo mkdir /mnt/media

Now that we've allocated a directory for the NTFS drive, we need to update the file system tables on Linux with the location of the drive.

Step 4: Update the File System Tables and Mount the Drive

update fstab

Updating the file system tables is a crucial step that enables your Linux machine to recognize and mount new storage drives. In Linux, the /etc/fstab file stores the file system configurations.

sudo nano /etc/fstab

You need to add the NTFS drive's location and other important data to make sure that your system can mount it without any hiccups.

To update the file system table of your Linux system, use any text editor of your choice and open the /etc/fstab file.

In a new line, add the NTFS drive location, the directory that you created earlier, the driver to use (NTFS-3g), and read, write, and user access information. Make sure to separate each input with one Tab space. If you're unsure what to type in, you can replicate the settings for any drive that's already mounted and functional.

Write out the file once you're done inputting the data. Fire up the terminal and use the mount command in conjunction with your device ID to mount it:

mount /dev/sda3 /mnt/media/drive_location_here

In case you wish to unmount the drive, you can do that using the umount command:

umount /dev/sda3 /mnt/media/drive_location_here

That's all you need to do. Optionally you can restart your system, however, it won't be required in most cases. You can now explore your NTFS drive from the terminal using the cd command or via the file manager of your Linux distro.

Now You Can Access Windows Drives in Linux

While it may be a bit tedious, it is still straightforward and a permanent process. You can now freely mount and unmount your Windows drives when logged into Linux. In case you want to permanently use the drive on Linux, you will need to format it.

About The Author
6223366c3c077-debarshidas.jpg?fit=crop&w=100&h=100

Debarshi Das (18 Articles Published)

I love breaking things and making things that help me in breaking things. When the screens are off, you can find me on the football ground or battling wits at the local chess club.

More From Debarshi Das

Subscribe to our newsletter

Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!

Click here to subscribe

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK