Attaching hard disks and USB flash disks in Linux

Source: Internet
Author: User
Hard Disk mounting and USB flash drive mounting in NTFS format in Linux

In Linux, direct mounting in NTFS format is not supported most of the time. To add the next plug-in or to the kernel, I will add the plug-in (because it is simple)
1) have to install ntfs-3g

Download ntfs-3g: wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2011.4.12.tgz
Unzip: Tar zxvf ntfs-3g_ntfsprogs-2011.4.12.tgz
Go to the unzip Directory: CD ntfs-3g_ntfsprogs-2011.4.12
./Configure -- prefix =/usr/local/ntf3g // compile and specify the installation directory/usr/local/ntf3g
Make & make install // compile and install
CD // return the root directory
Rm-r-F ntfs-3g_ntfsprogs *
In summary, the ntfs-3g is installed to complete
2) mount the NTFS hard disk.

First use # fdisk-L to check which NTFS format is used. Remember
Then create a mount Directory: mkdir/mnt/winf
Now of course it's mounted: ntfs-3g/dev/sdb2/mnt/winf-O locale = ar_SA.UTF-8
Note: ar_SA.UTF-8, can also be changed to zh_cn.gbk, it is obvious that the use of a certain encoding for mounting, to prevent garbled; // mount each partition to the corresponding directory, the following part is not added

Now, go to the Mount directory and create and delete the directory.
3) automatically mount the directory at startup

Back up the data first: CP/etc/fstab/etc/fstabbak
# Vim/etc/fstab
Add at the end:/dev/sdb7/mnt/winf ntfs-3g defaults 0 0 // If there are multiple partitions you add multiple
Save and exit. restart the system to automatically mount the hard disk.
2. FAT32 format mounting

The NTFS format is no longer complex. You can directly check which one is under/dev/and run the mount command:
# Mount-T vfat/dev/partition/Mount path
The operation above will be OK.
3. USB flash disk mounting

Plug in the USB flash drive. There is a USB flash drive icon in the lower right corner of the Linux Desktop. Click Select connection.
Run the following command:
# Mkdir/mnt/USB
Use # fdisk-L to view the device, write down the device, and mount the device.
# Mount-T vfat/dev/XXX/mnt/USB

Okay. If no error is reported, OK ........

To uninstall: umount/mnt/xxx


If you have any questions, please join us! 0.0


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.