Mount Windows partitions in Linux

Source: Internet
Author: User

If possible, we recommend that you use the FAT32 format instead of NTFS for Windows partitions mounted on Ubuntu. Because of the confidentiality and lack of NTFS file system structure documents, UBUNTU does not support NTFS very well. If you have a partition in NTFS format, you can use partition magic to convert it to FAT32 format (this operation is at your own risk ).

  • Create a mount point (directory) through which you can access windows partitions. By default, UBUNTU creates all mount points for file systems in the/media directory.

mkdir /media/partitionname

  • Mount the corresponding partition to this mount point. All partitions can be viewed under/dev. Each partition has a unique identifier. A general hard disk starts with "HD", and a SCSI or SATA hard disk starts with "SD, followed by letters A and B, it indicates that the partition is located on the hard disk. The last part is the number 1, 2, which indicates that the partition is the partition. (For example, the primary disk of the first ide interface is hda, its first partition is hda1, And the slave disk of the first ide port is HDB ). In multiple boot systems, the C partition of Windows is generally/dev/hda1.
    • FatPartitions can be mounted as follows
sudo mount /dev/hda1 /media/partitionname -t vfat -o iocharset=utf8,umask=000
    • NTFSPartitions can be mounted as follows
sudo mount /dev/hda1 /media/partitionname -t ntfs -o nls=utf8,umask=0222

      • Note: You can only read data from NTFS partitions and cannot perform write operations.
    • To automatically mount a partition when the system starts, edit the file/etc/fstab and add a line of code for the partition you want to mount. The content is as follows:
    • FatPartition:
/dev/hda1       /media/partitionname  vfat    iocharset=utf8,umask=000   0       0
    • NTFSPartition:
/dev/hda1       /media/partitionname  ntfs    nls=utf8,umask=0222 0       0
  • There are two uncommon additional parameters for vfat partitions -- "shortname = mixed" and "uid = 1000, gid = 1000 ". The first parameter will display all the 8.3 short file names in uppercase or lowercase; the second parameter will place all the files in the vfat partition under your name, in this way, when you copy an object to it, you can modify the date or time of the object.
  • Super User, Type
mount -a
    • Mount (remount) all partitions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.