How to mount USB flash disk, hard disk and optical drive under Linux system


I Linux mount USB flash disk:
1. Insert the USB flash disk into the computer. If only one USB flash disk is inserted and your hard disk is not a SCSI hard disk interface, its hardware name is sda1.
2. Create a USB directory under the MNT directory (for example:[ [email protected] root]# mkdir /mnt/usb)
3. Mounting USB flash disk: Mount – t VFAT / dev / sda1 / MNT / USB
4. Uninstall USB flash disk: umount / MNT / USB
5. Delete USB Directory: RM – RF / MNT / USB

II Linux mount hard disk:
1. Add FAT32 filesystem
The simplest usage
mount /dev/hda6 /mnt/wine
/Dev / HDA6 is the e disk of windows, and / MNT / wine is the directory attachment point. Linux recognizes the files in the / dev / HDA6 partitionsystemWhat is the type and then hang it. Of course, you can also specify the file of the partitionsystemType, the command is as follows:
mount -t vfat /dev/hda6 /mnt/wine
In practiceoperationTo avoid this situation, you can specify the character set. The command is as follows:
mount /dev/hda6 /mnt/d -o codepage=936,iocharset=cp936
mount -t vfat /dev/hda6 /mnt/d -o codepage=936,iocharset=cp936
Mount – t VFAT – O iocharset = cp936, codepage = 936 / dev / HDA6 / MNT / wine
Note: cp936 refers to simplified Chinese and cp950 refers to traditional Chinese.
Unmount the attached hard disk umount / MNT / wine
Delete the attached hard disk RM – RF / MNT / wine

2. Attach NTFS filessystem
On most current Linux versions, you need to recompile the Linux core to attach NTFS partition (compile)methodSee other articles). After the core supports NTFS, you can hang it with the following command:
mount -t ntfs /dev/hda2 /mnt/c
Similarly, for the problem that Chinese file names and directory names will be garbled, you can specify the character set. However, unlike attaching VFAT partitions, it is feasible to use the following commands in practice:
mount -t ntfs -o iocharset=cp936 /dev/hda2 /mnt/c -r
mount -t ntfs -o iocharset=cp936,rw /dev/hda2 /mnt/c
Note: cp936 refers to simplified Chinese and cp950 refers to traditional Chinese.
Uninstall delete as above!

III Linux auto mount hard disk
Open / etc and find the fstab file in it for editing. If you are logged in as an administrator, you can right-click – open method – GEDIT, and you can add a line directly after it:
/dev/hda6         /mnt/wine        vfat    codepage=936,iocharset=cp936,defaults,umask=0 0 0
/dev/hda5            /mnt/wind        vfat    codepage=936,iocharset=cp936 0 0
< umask = 0 means that ordinary users can also read and write >
IV Linux mount CD-ROM:

Command: Mount – t iso9660 / dev / HDC / MNT / CDROM
Uninstall delete as above!