Howto mount windows partition onto ubuntu Linux

by on May 23, 2006 · 55 comments· LAST UPDATED November 15, 2006

in

Q. How do I mount NTFS or FAT paritions under ubuntu Linux?

A. You can mount NTFS or FAT windows partition with mount command.

=> Click on Applications
=> Select Accessories
=> Select Terminal
=> Now terminal window will be on screen.

First you need to create directory where you can attach windows partition using mount command (for example /media/c for C:):# sudo mkdir -p /media/cNow find out list of partition (click on System > Administration > Disks ) or use following command:# sudo fdisk -l

Output:

Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        2432    19535008+  86  NTFS
/dev/hdb2            2433        2554      979965   82  Linux swap / Solaris
/dev/hdb3            2555        6202    29302560   83  Linux

As you see /dev/hdb1 is NTFS partition. Now type following command:# sudo mount -t ntfs -o nls=utf8,umask=0222 /dev/hdb1 /media/cTo unmount Windows NTFS partition type command:# sudo umount /media/cTo mount FAT partition type command:# sudo mkdir -p /media/d
# sudo mount -t vfat -o iocharset=utf8,umask=000 /dev/hda1 /media/d

To unmount Windows FAT (mounted at /media/d) partition type command:# sudo umount /media/d

Where,

  • -t : Specify file system type (such as NTFS or FAT)
  • umask=VALUE: Set the umask (the bitmask of the permissions that are not present). The default is the umask of the current process. The value is given in octal.
  • iocharset=VALUE: Character set to use for converting between 8 bit characters and 16 bit Unicode characters. The default is iso8859-1. Long filenames are stored on disk in Unicode format.
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 55 comments… read them below or add one }

1 Anonymous June 12, 2006 at 5:23 am

from the get-go, clicking Applications then Accessories does not appear to lead to “Terminal” on Ubuntu 5.04.

Reply

2 Jared Drake September 7, 2011 at 12:43 pm

Sorry, Ubuntu 5.04 is an old version of the operating system. Try to use version 11.04 of Ubuntu Linux, its the best and terminal program is available.

Regards
Jared

Reply

3 daragh September 23, 2011 at 3:18 pm

…and if in WUBI, just open /host directory – it is already mounted.

Reply

4 Anonymous June 24, 2006 at 11:18 pm

thanks for the tip it worked!

Reply

5 kapoios November 26, 2006 at 12:35 am

yeah it works great but when i restart the pc i must do it again isnt there anything more permanent??

Reply

6 nixCraft November 26, 2006 at 7:45 pm

kapoios, Please see following url. It explains how to use /etc/fstab file so that share gets automatically mounted at every system start:

http://www.cyberciti.biz/faq/access-windows-shares-from-linux/

Reply

7 some dumb guy September 24, 2007 at 7:08 pm

there is a tool called ntfs-3g this does allow the mounting of windows ntfs 4.x-6.x (4.x includes all NT 4.0 based and hence forth and 6.x indicates all windows 2003 onwards and not vista, vista has got windows filesystem. and i havent felt like downloading the RTM windows vista so i have no clue. and you are on your own)
scenario 1:
recompile the kernel in debian/ubuntu/kubuntu/ubuntuk blah blah blah debian and ubuntu based arch and add the flag ntfs r/w support enable module. and then mount the filesystem from CLI using the same command as illutrated above by the guy whose site this is.
scenario 2: go to ntfs for linux (google up, wont spoon feed, using debian means you should be confident enough to do this) and in that look up for ntfs-3g which is nothing but it enables you to mount the disk partition which is in ntfs 4-6x in read write mode. they have even simplified the command to one word viz
# mount.ntfs-3g /dev/hda1 /place/to/mount
# umount /dev/hda1
command 1 mounts leaving you the hassle of passing all other parameters and options and arguements and command 2? you are on your own if you dont know what it does. ;-)
i have followed the notes on linux-live and rolled my own custom distro based on debian (linux-live is based on slackware) but it works with other distro as well, and i have windows 2003 installed on a 4 GB compressed NTFS USB pen drive, which i often use to fiddle around.
hope this helps apart from the one mentioned above. this is just an addon to the old bunch of tuts from this website.
http://en.wikipedia.org/wiki/NTFS
hope this helps! good luck!
and what a co-incidence, i been looking for how to mount openbsd’s ffs in rw mode in linux and i end up here and the captcha shows “freebsd”
;-)

Reply

8 vorticon November 28, 2007 at 4:32 pm

Very simple and helpful tutorial… used it to backup a really crappy old vfat win98 drive :D

Reply

9 A fan January 26, 2008 at 7:13 pm

Thanks for the tip!

Reply

10 the constant skeptic July 31, 2008 at 7:42 pm

Great post. It worked great. I am dual booting vista premium and ubuntu hearty heron via the wubi install. I love it so far.

Reply

11 Christopher August 17, 2008 at 8:56 pm

@ the constant skeptic

you can access the windows partition from /host/

Reply

12 Christopher August 17, 2008 at 8:58 pm

Sorry, I forgot to add that it only works in wubi or live cd.

Reply

13 Vinay Vijayan November 4, 2008 at 12:07 am

Hi,

I’m pretty new to this. I mounted my Windows drive and everything is fine. But I still could not write anything to that drive. Tried everything like using the mount with -w option. CHMOD 777 also does not work. I can read everything . Nautilus says could not change the permission.

Thanks.

Reply

14 sergio December 4, 2008 at 8:18 am

u r a God… i got into ubuntu without doing a backup or knowing wtf i was doing… luckly i found ur site and followed ur directions…. i dont think it worked ’cause i dont think i followed all ur intructions… but i must’ve done something right ’cause now i can see my windows partition and get the xp installation disk i have stored in it… thanks!!

Reply

15 mosh_monkey December 21, 2008 at 8:40 pm

Thank you SO much, I needed to recover some data in Linux and this helped me after hours of pulling my hair out! :D

Reply

16 cfn December 26, 2008 at 7:19 am

wah.. nice tips.. its work !! thanks ;)

may I ask samthing? how to show the partition NTFS it Places try at sidebar?

Reply

17 Barkhat January 10, 2009 at 11:56 pm

I followed your instructions and it worked. BUT I cannot access the drive. I have Vista and am using Kubuntu. My drive was originally partitioned into the C drive and a portion of that called “D” for Recovery. Iwas able to add Kubuntu as well.

So in Kubuntu when I open Dolphin (file manager) I see both the Recovery and the Partition 1 listed in the sidebar. When I click Recovery I get the files that are listed in that section, but when I click Partition_1, the folder is empty. A message at the bottom reads “could not enter folder /media/c”. Also, am not allowed to unmount the drive.

I’m a real Linux novice and I don’t know how to fix this. Is there anyone who could help me get access to the Vista drive please?

Reply

18 Barkhat January 11, 2009 at 12:07 am

Okay, now the strangest thing has happened. Using your instructions here I went back and umount the drive. It did not unmount as I saw it when I opened Dolphin up again. I clicked on Partition_1 and this time it asked me for a password. After I entered it, there were folders showing where before nothing had been (nor had a password previously been requested). I was able to then see my files and access them.

I’m even more befuddled now. Can you shed any light on this (in case I run into it again somehow)? Thank you.

Reply

19 Rohith February 2, 2009 at 1:02 pm

Very nice…. Simple tip and it worked successfully!

Reply

20 Gaurav February 18, 2009 at 3:00 pm

thanks it was really helpful I’m using XUbuntu and m a new user to linux

Reply

21 Gaurav February 18, 2009 at 3:01 pm

thanks it was really helpful I’m using XUbuntu and m a new user to linux but would u please tell me how to mount my cd-rom and floppy drive as well
I will be thankful

Reply

22 nixCraft February 18, 2009 at 5:41 pm

CD will be automatically mounted as soon as you insert into drive.

To mount floppy, enter
sudo mkdir -p /mnt/floppy
sudo mount /dev/fd0 /mnt/floppy
cd /mnt/floppy
ls

Reply

23 Frederick February 24, 2009 at 4:05 am

Thanks so much, I could see my ubuntu in the documents and settings on windows but I couldn’t see windows from ubuntu, thanks!

Reply

24 Manish Gupta March 2, 2009 at 6:41 pm

Thanks a lot !!!
it solved my problem

Reply

25 Matt March 11, 2009 at 11:48 am

I cant find my windows partition. I am running ubunto 8.10 on virtualbox with guest additions installed. This is what I am getting:

matt@matt-laptop:~$ sudo fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0005f5d1

Device Boot Start End Blocks Id System
/dev/sda1 * 1 993 7976241 83 Linux
/dev/sda2 994 1044 409657+ 5 Extended
/dev/sda5 994 1044 409626 82 Linux swap / Solaris

Reply

26 serekedde andrew March 30, 2009 at 1:22 pm

hey i think this tip is for later versions like from 6 downwards so u’ve got to move up a notch it is free download dude

Reply

27 Bongkeng April 9, 2009 at 3:34 am

i have list like this :
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 19457 135805477+ f W95 Ext’d (LBA)
/dev/sda5 2551 7650 40965718+ 7 HPFS/NTFS
/dev/sda6 7651 16907 74356821 7 HPFS/NTFS
/dev/sda7 16908 17168 2096451 82 Linux swap / Solaris
/dev/sda8 17169 19457 18386361 83 Linux

how can i do to mount sda2, sda5 and sda6?
i’m using distro CrunchBang Linux for eee and i’m using intel atom mininote merk Forsa FS3801.

and then my keyboard not working done, if i press shift with any number, can’t show the upper symbol on the button..
help me please..

thanks

Reply

28 ramadatta June 21, 2009 at 5:29 pm

Thank you very much..I have my windows OS back..I am really thankful to you advise.

Reply

29 Johnson Yip August 16, 2009 at 8:38 pm

Thanks, it works now I can explore my windows NTFS Disk in Ubuntu.

Reply

30 tharpa September 3, 2009 at 11:42 pm

This is great! I’m now one major step closer to being able to leave Windows behind. I’m just astonished when something actually works without too much hassle!

Reply

31 tharpa September 5, 2009 at 4:34 pm

I have the same question as kapoios, how to make the mount permanent. The link that nixcraft provided seems to be based on reading only Windows Shares, rather than whole drives. How would I use this method, but make it start up with GNU/Linux?

Reply

32 tharpa September 6, 2009 at 2:32 pm

@Bongkeng start with:
sudo mkdir -p /media/c
sudo mount -t ntfs -o nls=utf8,umask=0222 /dev/sda5 /media/c

Reply

33 Shahrasaan December 15, 2009 at 10:32 am

hi, there,
This is Shahrasaan, i’m in trouble with my Ubuntu 9.04 once i was happy with it but sometimes before it asked me for a update and i allowed it.
Now it’s not showing my Windows XP OS because i have updated my grub to grub-2 it shows on the startup : Debain GNU/Linux kernel 2.6.28.17 on the top, 2.6.28.16 on the middle and 2.6.28.11 on the bottom with their recovery modes but not my Windows XP is listed as it was before…. is their any thing in Ubuntu like system restore in Windows

Reply

34 Sajal January 12, 2010 at 9:32 am

Thank you very much .
These commands really worked .
I was trying to mount from a lot of time but succeeded with this one .

Reply

35 CJC February 10, 2010 at 9:38 am

Thank you so much. It worked perfectly.

Reply

36 Ritesh September 28, 2010 at 8:32 am

Hi,
I got the following error when i mount ntfs partition on centos 5
Output of fdisk
# fdisk -l

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 523 4096575 82 Linux swap / Solaris
/dev/sda3 524 19452 152047192+ 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 121601 976760001 7 HPFS/NTFS

# mount -t ntfs -o nls=utf8,umask=0222 /dev/sdb1 /mnt/backup_94/
FATAL: Module fuse not found.
ntfs-3g-mount: fuse device is missing, try ‘modprobe fuse’ as root
#

Can any one help to sort the issue ?

Reply

37 M. Jeyaraj September 29, 2010 at 5:27 am

dear sir,

i am using dual os how can i mount the windows partition mount with linux 5
pls reply my mail

Reply

38 Mike Avison October 16, 2010 at 6:52 pm

Hi
With Ubunto 10 it is easier than the methods above.
From your top menu select system>administration>disk utility

It shows you a map of the partitions of all the local disks.

Click on the partition you want to mount (it goes darker) then click on Mount the Volume (just below). Over to the right you will see the mount point (e.g. /media/document).

Check it out by starting File Browser and navigating to the mount point, you should find the contents of your windows file system.

Simples

Reply

39 Aditya March 1, 2011 at 8:45 pm

i have a problem i can not see my windows NTFS partitions in my user, i can only see the partitions on login from root…

please help me, how can i access my /dev/sda2 partition on login as a user as well as root.
please reply me on my email ID.

Reply

40 Mount Trouble March 9, 2011 at 8:28 am

When using:
sudo mount -t ntfs -o nls=utf8,umask=0222 /dev/sda2 ~/Windows/C:
I get:
Mount is denied because the NTFS volume is already exclusively opened. The volume may be already mounted, or another software may use it which could be identified for example by the help of the ‘fuser’ command.
However, when I run this:
fuser -a
I get:
No process specification given

Thanks for helping a n00b.

Reply

41 Dev April 27, 2011 at 8:00 pm

i have $ instead of # at the command

Reply

42 sickophant May 3, 2011 at 4:18 am

Exactly what I needed. Thanks, dude.

Reply

43 jj September 23, 2011 at 9:38 pm

Hello, I followed your tutorial but it didn’t work on Ubuntu 11.04. My laptop has 2 hard drives, one of which holds the Linux OS and its partitions and the other is a NTFS file archive. I can’t access the NTFS volume, although I have no problem with external hard drives. Here’s my terminal’s output

sudo fdisk -l

Disco /dev/sda: 80.0 GB, 80026361856 byte
255 testine, 63 settori/tracce, 9729 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x000cda23

Dispositivo Boot Start End Blocks Id System
/dev/sda1 * 1 9534 76578816 83 Linux
/dev/sda2 9534 9730 1569793 5 Esteso
/dev/sda5 9534 9730 1569792 82 Linux swap / Solaris

Disco /dev/sdb: 80.0 GB, 80026361856 byte
255 testine, 63 settori/tracce, 9729 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x754d5e9b

Questa non sembra una tabella delle partizioni.
Probabilmente è stato scelto il dispositivo sbagliato.

Dispositivo Boot Start End Blocks Id System
/dev/sdb1 ? 1 9729 78148161 7 HPFS/NTFS

When i then do

sudo ntfs-3g /dev/sdb1 /media/d

ntfs-3g: Failed to access volume ‘/dev/sdb1′: File o directory non esistente

ntfs-3g 2010.8.8 external FUSE 28 – Third Generation NTFS Driver
Configuration type 1, XATTRS are on, POSIX ACLS are off

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2010 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson

Usage: ntfs-3g [-o option[,…]]

Options: ro (read-only mount), remove_hiberfile, uid=, gid=,
umask=, fmask=, dmask=, streams_interface=, syncio.
Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

Ntfs-3g news, support and information: http://ntfs-3g.org

Reply

44 Mike Avison September 24, 2011 at 3:28 pm

Hi JJ

Did you try my method above (October 2010)? (using disk utility, no need to type anything!)

I’ve also got one PC mounting its NTFS disk automatically at startup by editing the fstab file. I could show you the script if you wanted, it is very easy.

Mike

Reply

45 shanaka October 11, 2011 at 2:42 pm

great…worked 4 me..thnkx

Reply

46 Jagdish October 14, 2011 at 12:06 pm

Hi,

Initially I have windows 7, i did two partition of disk. I installed ubuntu 11.04 Natty on free disk, after completion of installation, when i reboot the system, it is not listing windows 7 option in prompt and also it is not showing data in the ubnuntu. It is showing that Unknown for this System->Administration->Disk.
Please give the solution how can i get my data back?
Thanks,
Jagdish

Reply

47 Jagdish October 14, 2011 at 12:12 pm

Hi,
I tried to mount
using following steps
jagdish@jagdish-ThinkPad-T420:~$ sudo mkdir -p /media/c
jagdish@jagdish-ThinkPad-T420:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2ed1e535

Device Boot Start End Blocks Id System
/dev/sda1 * 1 32517 261186584 7 HPFS/NTFS
/dev/sda2 32517 33003 3905537 5 Extended
/dev/sda3 33003 60802 223291392 83 Linux
/dev/sda5 32517 33003 3905536 82 Linux swap / Solaris
jagdish@jagdish-ThinkPad-T420:~$ sudo mount -t ntfs -o nls=utf8,umask=0222 /dev/hdb1 /media/c
ntfs-3g: Failed to access volume ‘/dev/hdb1′: No such file or directory

ntfs-3g 2010.8.8 external FUSE 28 – Third Generation NTFS Driver
Configuration type 1, XATTRS are on, POSIX ACLS are off

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2010 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson

Usage: ntfs-3g [-o option[,…]]

Options: ro (read-only mount), remove_hiberfile, uid=, gid=,
umask=, fmask=, dmask=, streams_interface=, syncio.
Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

Ntfs-3g news, support and information: http://ntfs-3g.org
jagdish@jagdish-ThinkPad-T420:~$

Got above error

Reply

48 Jayakrishnan August 29, 2012 at 1:42 pm

Can we mount window shared folder to linux system

Reply

49 Sandy September 9, 2012 at 2:44 am

fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x54d27ed7

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2459647 1228800 7 HPFS/NTFS/exFAT
/dev/sda2 2459648 956291071 476915712 7 HPFS/NTFS/exFAT
/dev/sda3 956291072 976771071 10240000 7 HPFS/NTFS/exFAT

I have created a mount point as /media/windows.
When I try to mount /dev/sda2 to the above mount point, I get an error as follows:

mount -t ntfs -o nls=utf8,umask=0222 /dev/sda2 /media/windows
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the ‘fuser’ command.

How do I fix this. Any help would be appreciated. Thanks.

Reply

50 Tharpa September 9, 2012 at 10:20 am

The first thing I would do would be to type fuser at the command line and see if it provides any helpful information.

Reply

51 Momen September 27, 2012 at 8:48 am

You have to check first if the drive is already mounted or no:
# df -h
if the drive is already mounted u have to unmount then mount again to the new mounting point.
And better u use the command ntfs-3g cause mount didn’t work very good with me:

# sudo ntfs-3g /dev/sda2 /media/windows

It worked for me I hope it will for u too.

Reply

52 love October 26, 2012 at 7:14 pm

if i m making a directory in c which is of 60 gb and mounting a drive which is of 200gb so it is possible or not …please help

Reply

53 mikeavsion October 27, 2012 at 7:54 am

I don’t think that is a problem but I am not sure I understand you correctly. Disks are usually called C (etc) in Microsoft Windows. Do you mean your 60Gb directory is on the Windows disk or the Ubuntu disk?

Whatever, I think you are asking: if the mount point on the Ubuntu disk has to have as much available space as the size of the disk you are going to mount? Good news, it doesn’t. The mount point takes just a few bites out of the Ubuntu available disk space. The disk you are mounting can be any size.

Reply

54 Nabid December 22, 2013 at 11:06 am

worked fine. thanks a lot.

Reply

55 Yuri da Silva July 7, 2014 at 7:41 pm

Thank you, helped me when acessing my document from Windows. I can’t make any thing that is graphic and require my password. Do have some command from terminal which fix it? And, when I boot my computer, Lxpanel do not loads and I use CTRL-ALT-T. Some Other Command?

Reply

Leave a Comment

Tagged as:

Previous Faq:

Next Faq: