How To Access Windows Drives From Linux?

Loading

This one's a quick how-to about mounting Windows drives from Linux(Fedora 7).

From the Fdisk manual pages:

"Hard disks can be divided into one or more logical disks called partitions. This division is described in the partition table found in sector 0 of the disk. There may be reasons of security, ease of administration and backup, or testing, to use more than the minimum number of partitions".

You would have seen C Drive, D Drive, E Drive, etc on Windows. They are also known as logical disks and partitions. Users wanting to migrate to Linux often install dual operating systems on their desktop computers. Many of you would have installed both Windows and Fedora GNU/Linux on your computers. When you boot Windows you don't see the Linux drives and when you boot Linux you don't see Windows drives.

You can access the Windows drives from Linux using fdisk and mount commands. The procedure to set this up is very easy on Fedora 7. I did it in only two steps.

The fdisk manual page says, "fdisk (in the first form of invocation) is a menu driven program for creation and manipulation of partition tables. It understands DOS type partition tables and BSD or SUN type disklabels". Let's use the intelligence of fdisk.

Step 1: Type the below command in the Terminal as root

fdisk -l

Edit: It is the letter 'L' in lowercase. Some users thought it was 1(numeric one). There is a space between fdisk and -l.

You will see tabular data like below.
fdisk -l screenshot

We only want information from Device and System columns. In the first row, we see a device /dev/sda1 with the file system HPFS/NTFS. This is the Windows XP C drive. Let's access this drive using the mount command. The mount command helps us to attach the Windows C Drive to any directory on the Linux file system.
Step 2:

mount /dev/sda1 /mnt

This will attach the Windows C drive to the /mnt directory. Now you can see the files and folders in your Windows C Drive at /mnt. You can add an entry in your fstab file to mount the Windows directory every time you boot Linux.

About the author

Sudheer is an entrepreneur and software developer. Get more from Sudheer on Twitter.


mount windows volumes

how to add an entry in fstab to mount a specified windows directory?

I've been trying to make

I've been trying to make linux work for me but it kept my head spinning. I've been reading a lot of linux books online and hopefully I can make it work this time.

Margie

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>. The supported tag styles are: <foo>, [foo].

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.