Linux operating system mounts U disk and hard disk drive problem

  

A. Linux mount U disk:

1, insert u disk to the computer, if only a u disk is inserted and your hard disk Not the scsi hard disk interface, then its hardware name is: sda1.

2, first create a usb directory in the mnt directory (such as: [root@localhost root]# mkdir /mnt/usb)

3, mount U disk: mount -t Vfat /dev/sda1 /mnt/usb

4. Unmount U disk: umount /mnt/usb

5. Delete usb directory: rm -rf /mnt/usb

II. Linux mount hard disk:

1. Add FAT32 file system

The easiest usage

mount /dev/hda6 /mnt/wine

/dev/hda6 is the Windows E drive, /mnt/wine is the directory plus point. Linux will recognize what the file system type of the /dev/hda6 partition is and then add 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 the actual operation, directly add a windows partition , Chinese file names and directory names will be garbled, in order to avoid this situation 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 (commonly 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.Add the NTFS file system

On most current Linux distributions, you need to recompile the Linux kernel and add NTFS partitions (see other articles for compiling methods). After the core supports NTFS, you can use the following command to add:

mount -t ntfs /dev/hda2 /mnt/c

Similarly, the Chinese file name and directory name will be garbled. Specify the character set, but unlike the vfat partition, it is possible to use the following command:

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, cp950 refers to Traditional Chinese.

Uninstall and delete the same as above!

Three.Linux automatically mount the hard disk

Open /etc to find the internal fstab file for editing, if you log in as an administrator, You can right-click the open method --gedit, you can append the line directly:

/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

IV.Linux Mount CD-ROM:

Command: mount -t iso9660 /dev/Hdc /mnt/cdrom

Uninstall delete as above!

Copyright © Windows knowledge All Rights Reserved