mount windows partition in linux

How to Mount Windows Partition in Ubuntu

If you are using dual boot of Windows & Ubuntu then you may need to sometime access Windows partition via Ubuntu. By default, Linux cannot mount Windows partitions since they are in a different file format (NTFS or FAT32). In this article, we will learn how to mount Windows partition in Ubuntu. This is useful if you want to directly access files on Windows partitions from Ubuntu.



How to Mount Windows Partition in Ubuntu

There are a couple of ways to solve this problem. You can mount Windows partition via Ubuntu File Manager, or using terminal. We will look at both these approaches.


Mount Window Partition Using File Manager

The first step is to fully shut down your system. Then boot your machine and select Ubuntu from grub menu to boot into Ubuntu.

After that, open file manager in Ubuntu. You will see the following window. From the left pane, look for the partition you want to mount, under Devices, and click it. It will be mounted automatically and its content will be displayed in the right pane.


Mount Windows Partition in Read Only Mode

The second method is to manually mount the filesystem from command line terminal in the read only format. All mounted filesystems are present in /media/$USERNAME/ directory.

Make sure you have a mount point in that directory for the Windows partition. In our case, we have $USERNAME=test_user and Windows partition is to be mounted to WIN_PART directory. You can name it as per your requirement. Open terminal and run the following command.

$ cd /media/test_user/
$ ls -l

You will find that the mount point is missing. Create it using mkdir command. If you get ‘Permission Denied’ error while running the following command, use sudo keyword at the beginning of the command.

$ sudo mkdir /media/test_user/WIN_PART

Now find the device name by listing all block devices attached to the system, using lsblk command.

$ lsblk

Now mount the partition in read only mode using the following command.

$ sudo mount -t vfat -o ro /dev/sdb1 /media/test_user/WIN_PART		#fat32
OR
$ sudo mount -t ntfs-3g -o ro /dev/sdb1 /media/test_user/WIN_PART	#ntfs

Next, to get the mount details of your device run the mount command without any options and search its output for keyword ‘sdb1’ using grep command. This is because we have mounted the device to /dev/sdb1. If your device has a different identifier, you need to change the search string.

$ mount | grep "sdb1" 

But please note that in this case all files will be read only and you will not be able to write to any of the files on your Windows partition. Nevertheless it is a very useful way to quickly be able to access Windows files from your Ubuntu system.

Also please note, if your Windows is in a hibernated state, then if you write or modify files in Windows partition, all changes will be lost after reboot.

In this article, we have learnt a couple of ways to mount Windows partition in Ubuntu system. In fact, you can follow these steps in other Linux systems also. It is very useful to access Windows files from Linux systems directly instead of rebooting and copying those files to another device, and then mounting them in Linux.

Also read:

Top Hex File Editors in Linux
How to Setup Two Factor Authentication for SSH
How to Delete All Text in File Using Vi Editor
How to Edit Hex Files in Linux
How to Add/Remove Software Repository in Fedora

Leave a Reply

Your email address will not be published. Required fields are marked *