Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-08-2006, 05:20 PM   #1
LQ Newbie
Registered: May 2006
Location: Norway
Distribution: Ubuntu "Breezy Badger"
Posts: 17

Rep: Reputation: 0
Question how can i read NTFS on ubuntu

i know debian based linux(and probably more or all) can read NTFS but im having problems accessing mine. since you see me posting this topic here you know im a , but plis help me anyway.

what ive tried
opening disk manager, and tried to enable it from there, whit no luck

opening command line and looking for info, whit no luck

and my final question is if i can get linux to read/write NTFS file systems whit a patch or something, and were do i get that?

if you need any more info from me to help just ask, Thanks in advance

Last edited by Sigudian; 05-08-2006 at 05:21 PM.
Old 05-08-2006, 05:28 PM   #2
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271

Be sure to only mount read only. Write access to NTFS is still experimental and you might damage your windows install by trying to write to it. You've been warned....
Old 05-08-2006, 05:53 PM   #3
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
I don't use a Debian-based system, but I'm assuming some of this is fairly generic to all systems. If someone knows differently, please feel free to correct me. I don't know how much of a newbie you are, so I apologise if some of this sounds condescending.

[This has mainly been lifted form]

You can check what kind of filesystems your installation can support by typing (copying) the following command into your favourite terminal:
cat /proc/filesystems
You should see something like this
    nodev   rootfs
    nodev   bdev
    nodev   proc
    nodev   sockfs
    nodev   tmpfs
    nodev   shm
    nodev   pipefs
    nodev   ramfs
    nodev   devpts
The last line there is the important one: it tells you your system can support ntfs (it may not be the last line when you run the command - make sure you check the list carefully). If you see ntfs in the output of the above command, then all you need to do is tell your system to recognise the fact you have another drive you'd like it to access. To do this you need to "mount" the drive. (The man page for the mount command is an invaluable tool at this point, so I'd recommend you have a look at it at some point (type man mount into a terminal)).

This is accomplished using the mount command from within a terminal, and is only executable as root. To switch from a user to root in a terminal, type
su -
whereafter you will be prompted for your root's password. Once you've entered it, you can mount the drive.

To mount the drive, you need to find out what the system calls you ntfs drive. To do this type
/sbin/fdisk -l
as root into your terminal. The output should look something like this:
Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         767     6160896    7  HPFS/NTFS
/dev/hda2             768         780      104422+  83  Linux
/dev/hda3             781        2434    13285755   8e  Linux LVM

Disk /dev/hdb: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1       19929   160079661    7  HPFS/NTFS
although it will differ depending on how many drives/partitions you have. In order to mount your ntfs partition/drive, identify which of the ones listed in that output is the one you're looking to mount (in my case, /dev/hda1 and /dev/hdb are my windows partition/drives). Next thing to do is to choose where you want to mount your drive. More often than not, there's a folder called mnt in your root directory (/mnt). I mount all my ntfs drives in here, and in order to do this you need to first create a folder into which you can mount the drives/partitions. As root, type
mkdir /mnt/windows_drive
Once you've done that, you can issue the command to mount the ntfs paritions, using the /dev/hdX from the output of /sbin/fdisk -l:
mount /dev/hdX /mnt/windows_drive -t ntfs -r -o umask=0222
(where hdX is the partition/drive you're looking to mount). Once you've done this, you should be able to change directory into /mnt/windows_drive as have a nose around. The -r and -o flags in the mount command make the /mnt/windows_drive directory read-only, since the ability to write to ntfs partitions is largely experimental in linux at the moment.

In order to get your ntfs drive/partition to mount automagically at boot, you need to edit your fstab file. So, as root, open up /etc/fstab using your favourite text editor (nedit, gedit, vi(m), emacs etc.) (at this point, it may be worth making a backup of your fstab file by copying the original (cp /etc/fstab /etc/fstab.old)). Once you've opened up your fstab file, add something like this to it:
/dev/hdX               /mnt/windows_drive            ntfs    ro,umask=0222   0 0
(remember to replace hdX with your drive/partition). This basically turns the mount command you've just issued in the terminal into something which Linux does each time you boot your computer (you may notice that there are some similarities: ro, umask=0222 etc.) The umask=0222 allows users to access and read from the drive, but no-one can write to it. If I remember rightly, you have to leave an empty line at the end of the fstab file.

Last edited by pwc101; 05-08-2006 at 06:09 PM.
Old 05-08-2006, 10:43 PM   #4
LQ Guru
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
The Ubuntuguide has a section dedicated to NTFS.. it may help you see how Ubuntu handles NTFS partitions..

pretty simple really..

Q: How to mount/unmount Windows partitions (NTFS) manually, and allow all users to read only?

   1. Read General Notes
   2. Read How to list partition tables?
   3. e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
           Local mount folder: /media/windows

   4. To mount Windows partition

      sudo mkdir /media/windows
      sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222

   5. To unmount Windows partition

      sudo umount /media/windows/

Q: How to mount Windows partitions (NTFS) on boot-up, and allow all users to read only?


Last edited by farslayer; 05-08-2006 at 10:44 PM.
Old 05-09-2006, 08:57 AM   #5
LQ Newbie
Registered: May 2006
Location: Norway
Distribution: Ubuntu "Breezy Badger"
Posts: 17

Original Poster
Rep: Reputation: 0
Originally Posted by pljvaldez
(url was removed, go to original post to get it)

Be sure to only mount read only. Write access to NTFS is still experimental and you might damage your windows install by trying to write to it. You've been warned....
thank you thank you thank you thank you

and thanks to all other who posted, but i got it the first post, im starting to get a hang of linux

for the record (so no one get mad) its not an exact quote because i was not allowed to post URL's... yet


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NTFS Read Only? boxxa SUSE / openSUSE 10 10-24-2005 02:21 AM
access ntfs using ubuntu ajg2012 Linux - Newbie 1 10-02-2005 02:47 PM
No way to read NTFS in Fedora? Beckerjr Fedora 4 04-06-2005 03:35 PM
why does my ntfs partition only read-only? kublador Linux - General 4 04-10-2003 12:50 PM
NTFS Read Write Snabber Linux - Newbie 1 12-23-2002 06:42 PM

All times are GMT -5. The time now is 09:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration