Modify the default CentOS encoding to utf8

Source: Internet
Author: User
Step 1: Edit the system configuration file vim/etc/sysconfig/i18n to change the original configuration in the LANG = & quot; quotation marks into this zh_CN.UTF-8 to save and exit. Step 2: modify the default language environment variable value of the CentOS runtime environment vim/etc/profile to find the exportLANG line and write it before the export

Step 1:

Edit system configuration file

Vim/etc/sysconfig/i18n

In the original configuration, change the LANG = "" inside the quotation marks to this zh_CN.UTF-8

Save and exit.

Step 2:

Modify the default language environment variable value of the CentOS runtime environment

Vim/etc/profile

Find the export LANG line and write it before the export

LANG = "zh_CN.UTF-8"

In general, there is already a LANG = "GB or something". if it is changed directly to the quotation marks, it will be o.

 

Want to modify to other, just replace the zh_CN.UTF-8 with the corresponding on the line

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.