Mount a USB flash disk in linux and solve the garbled problem.

Source: Internet
Author: User

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.

Related Article

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.