Mount a USB flash disk in linux and solve the garbled problem.
1. Switch to the root user first;
2. Run the fdisk-l command to view the disk information and find the USB flash disk (you can determine the disk Size Based on the displayed size)
3. Create a mount point under/mnt, for example, create a usb Folder: mkdir/mnt/usb
4. mount the usb flash drive with mount, for example, mount/dev/sdb/mnt/usb
5. sometimes the file name displayed on the loaded USB flash drive is garbled. In this case, you need to specify the encoding when mounting the USB flash drive. For example, you can run the following command to mount the USB flash drive: mount-o iocharset = utf8/dev/sdb/mnt/usb
6. After mounting is completed, you can access the content of the usb flash disk with cd/mnt/usb and perform related operations.
7. unmount the usb flash disk: umount/mnt/usb
8. Delete the created mount point: rm-rf/mnt/usb
Chinese characters garbled during mounting to a USB flash drive in linux
Edit this file to add the following content: vi/etc/sysconfig/i18n
LANG = "zh_CN.UTF-8"
LANG = "zh_CN.GB18030"
LANGUAGE = "zh_CN.GB18030: zh_CN.GB2312: zh_CN"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh: en_US.UTF-8: en_US: en"
SYSFONT = "latarcyrheb-sun16"
Mount a USB flash drive in linux. The file name is garbled. After the utf8 option is added, the file is still garbled when it is copied to/home /.
Garbled text is only a problem of display. If your file was originally written in any encoding, no Garbled text will be displayed. For example, if your terminal displays garbled characters, it may be because your display terminal selects a non-UTF-8 format. If the code is incorrectly read, you need to identify the original encoding and convert it to UTF-8. If the file name of your USB flash drive is written in gb2312, you can add utf8 to the options, which is also garbled.