Article Title: how to mount a USB flash drive and a hard drive in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source. I. Linux Mount USB flash drive:
1. Insert a USB flash disk to a computer. If only one USB flash disk is inserted and your hard disk is not a scsi hard disk interface, the hardware name is sda1.
2. Create a usb directory under the mnt directory (for example, [root @ localhost root] # mkdir/mnt/usb)
3. mount a usb flash drive: mount-t vfat/dev/sda1/mnt/usb
4. unmount the usb flash disk: umount/mnt/usb
5. Delete the usb Directory: rm-rf/mnt/usb
II. Linux hard disk mounting:
1. Add the FAT32 File System
Simplest usage
Mount/dev/hda6/mnt/wine
/Dev/hda6 is an e disk of Windows, And/mnt/wine is a directory mount point. Linux recognizes the type of the file system in the/dev/hda6 partition, and then adds it. Of course, you can also specify the file system type of the partition. The command is as follows:
Mount-t vfat/dev/hda6/mnt/wine
In practice, a windows partition is directly attached, and the Chinese file name and directory name are garbled. To avoid this problem, you can specify a character set by running the following command:
Mount-t vfat-o iocharset = cp936, codepage = 936/dev/hda6/mnt/wine (frequently used by the author)
Note: cp936 refers to simplified Chinese and cp950 refers to traditional Chinese.
Unmount the mounted hard disk umount/mnt/wine
Delete the mounted hard disk rm-rf/mnt/wine
2. Mount the NTFS file system
In most Linux versions, you need to re-compile the Linux core to mount the NTFS partition (see other articles for the compilation method ). After the core supports NTFS, run the following command:
Mount-t ntfs/dev/hda2/mnt/c
You can also specify the character set for garbled characters in Chinese file names and directory names. However, unlike the vfat partition, the following command is practical:
Note: cp936 refers to simplified Chinese and cp950 refers to traditional Chinese.
The same is true for uninstallation and deletion!
3. Linux automatic hard disk mounting
Open/etc and find the fstab file to edit it. If you log in as an administrator, right-click and choose open mode> gedit. You can directly append the following lines:
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