Difference between revisions of "NTFS"

From Linuxintro
imported>ThorstenStaerk
 
(6 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
 
= Formatting NTFS volumes =
 
= Formatting NTFS volumes =
To format a disk ''/dev/sda1'' as NTFS, use
+
To format a disk ''/dev/sdx1'' as NTFS, use
  mkfs.ntfs ''/dev/sda1''
+
  mkfs.ntfs ''/dev/sdx1''
  
 
= Mounting NTFS volumes =
 
= Mounting NTFS volumes =
To mount our [[NTFS]] [[partition]] read/write, use ntfs3g:
+
To mount our [[NTFS]] [http://en.wikipedia.org/wiki/Disk_partitioning partition] read/write, use ntfs3g:
  # [[mkdir]] ''/mnt/ntfs''
+
  # mkdir ''/mnt/ntfs''
 
  # ntfs-3g ''/dev/sdb1'' ''/mnt/ntfs''
 
  # ntfs-3g ''/dev/sdb1'' ''/mnt/ntfs''
 
  # [[ls]] ''/mnt/ntfs''
 
  # [[ls]] ''/mnt/ntfs''
 
  # [[echo]] ''hallo''>''/mnt/ntfs/welt''
 
  # [[echo]] ''hallo''>''/mnt/ntfs/welt''
  # [[ll]] ''/mnt/ntfs/''
+
  # ll ''/mnt/ntfs/''
 
  total 1
 
  total 1
 
  -rwxrwxrwx 1 root root 6 Dec  8 12:37 ''welt''
 
  -rwxrwxrwx 1 root root 6 Dec  8 12:37 ''welt''
Line 17: Line 17:
  
 
= Unmounting NTFS volumes =
 
= Unmounting NTFS volumes =
To unmount our [[NTFS]] [[partition]], remember that it is mounted using fuse:
+
To unmount your [[NTFS]] partition, remember that it is mounted using fuse:
 
  # mount
 
  # mount
 
  [...]
 
  [...]
 
  ''/dev/sdb1'' on /mnt/ntfs type fuseblk (rw,allow_other,blksize=4096)
 
  ''/dev/sdb1'' on /mnt/ntfs type fuseblk (rw,allow_other,blksize=4096)
So you can just unmount it using the [[command]] [[umount]]:
+
So you can just unmount it using the [[command]] umount:
 
  # umount ''/dev/sdb1''
 
  # umount ''/dev/sdb1''
 +
 +
= See also =
 +
* [[interoperability]]

Latest revision as of 06:06, 2 January 2021

NTFS is a file system used e.g. in Windows 2003 and 2008. It allows for files greater than 2GB and can be read and written as well under Linux as under Windows.

Formatting NTFS volumes

To format a disk /dev/sdx1 as NTFS, use

mkfs.ntfs /dev/sdx1

Mounting NTFS volumes

To mount our NTFS partition read/write, use ntfs3g:

# mkdir /mnt/ntfs
# ntfs-3g /dev/sdb1 /mnt/ntfs
# ls /mnt/ntfs
# echo hallo>/mnt/ntfs/welt
# ll /mnt/ntfs/
total 1
-rwxrwxrwx 1 root root 6 Dec  8 12:37 welt

ntfs3g uses fuse.

Unmounting NTFS volumes

To unmount your NTFS partition, remember that it is mounted using fuse:

# mount
[...]
/dev/sdb1 on /mnt/ntfs type fuseblk (rw,allow_other,blksize=4096)

So you can just unmount it using the command umount:

# umount /dev/sdb1

See also