Set centos to display Chinese characters

Source: Internet
Author: User
How to set up the Chinese language for Linux is a problem that many friends encounter when starting to use Linux, that is, Chinese characters are garbled when the terminal enters command Echo. This usually occurs because the Chinese language pack is not installed or the default language is incorrect. Take centos as an example. how to view the language in Linux and how to modify the language? 1. view the current system language. log on to the linux system, open the operating terminal, and enter echo $ LANG.

How to set up the Chinese language for Linux is a problem that many friends encounter when starting to use Linux, that is, Chinese characters are garbled when the terminal enters command Echo. This usually occurs because the Chinese language pack is not installed or the default language is incorrect. Taking centos as an example, how to view and modify the language in Linux

1.View the current system language

Log on to the linux operating terminal and enterEcho $ LANGYou can view the currently used system language. For example

2.View installed language packs

Check whether a Chinese language pack is available on the terminal.LocaleCommand. if zh cn is available, the Chinese language has been installed.

3.What if there is no Chinese language?

You can download and install the Chinese language pack from the Internet.Yum groupinstall chinese-support

After installation

Enter the locale command

 

4.How to change the system language to Chinese

1. temporarily change language

If you just temporarily change the language environment of the linux system, you can set the LANG = language name by entering, such as Chinese is a zh_CN.UTF-8

2.Modify system default language

The above method is to modify and set the default language configuration of the system.

Such as vI/etc/sysconfig/i18n(Restart the system after modification)

5.Other considerations

If you still cannot set the Chinese language according to the above settings, pay attention to the encoding selected by your link terminal.

For example, xshell selects terminal encoding.Chinese or UTF8You can.

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.