How to mount a windows folder in Linux

I'm running Linux ( Ubuntu 11.10 ) and Windows ( 7 ) on the same system on two partitions.

So I have this folder in Windows:

C:\Users\Me\Folder

And I created this folder in Linux:

/mnt/Folder

Now trying to do something like this:

sudo mount /media/ACER/Users/Me/Folder /mnt/Folder

This doesn't work. I'm guessing it has to do with that one can only mount a media and not folders. Anyhow. Is there some way to do this?


Solution 1:

Assuming your C: Windows drive is already mounted under /media/ACER, you can create a symbolic link to the subdirectory you're interested in:

$ sudo ln -sf /media/ACER/Users/Me/Folder /mnt/Folder

The -s option tells ln to create a symlink instead of a hard link, and the -f option instructs it to replace /mnt/Folder if it exists, so you won't have to delete it beforehand.

Solution 2:

You can always mount a drive(aka Paritition, Filesystem) into some folder and not one folder in another.

So in this case, you will need to mount your entire C: or D: to your folder.

In Linux, this folders are seen as /dev/sda1 or /dev/sdb3 or anything depending upon your drive creation and kinds of devices that you used.

to know more about your partitions, you can execute fdisk -l

to know about your already mounted partitions you can do : df -h (h for human readable)

One you have identified, which is your correct partition, like is it /dev/sda1 or /dev/sda2 you can mount them in this way:

sudo mount /dev/sda1 /path/to/your/folder