Home php教程 PHP开发 Does Linux display garbled characters in Chinese? How to set centos to display Chinese

Does Linux display garbled characters in Chinese? How to set centos to display Chinese

Dec 15, 2016 pm 04:21 PM
linux Chinese garbled code

How to set the Chinese language of the Linux system? This is a problem that many friends will encounter when they start using Linux. When the terminal input command is echoed, the Chinese text displays garbled characters. This situation usually occurs because the Chinese language pack is not installed, or there is a problem with the default language set. Taking centos as an example, how to check the language, set and modify the language when operating Linux

Does Linux display garbled characters in Chinese? How to set centos to display Chinese

1. Check the current system language

After logging in to the Linux system and opening the operating terminal, enter echo $LANG to check the currently used system language. Such as

Does Linux display garbled characters in Chinese? How to set centos to display Chinese

2. Check the installed language pack

To see if there is a Chinese language pack, you can enter the locale command in the terminal. If there is zh cn, it means that the Chinese language has been installed

Does Linux display garbled characters in Chinese? How to set centos to display Chinese

3. What if there is no Chinese language?

You can download and install the Chinese language package yum groupinstall chinese-support from the Internet

Does Linux display garbled characters in Chinese? How to set centos to display Chinese

After installation

Enter the locale command

Does Linux display garbled characters in Chinese? How to set centos to display Chinese

4. How to modify the system language to Chinese

1 Temporarily change the language

If To temporarily change the language environment of the Linux system, you can set LANG=language name by inputting it, such as zh_CN.UTF-8 for Chinese

2. Modify the system default language

The above method is to set the system default language configuration by modifying

such as vi /etc/sysconfig/i18n (Be careful to restart the system after making the changes)

Does Linux display garbled characters in Chinese? How to set centos to display Chinese

5. Other notes

If it still doesn’t work to modify and set the Chinese language according to the above method, pay attention to the encoding selected by your link terminal.

Take xshell as an example, select Chinese or UTF8 as the terminal encoding

Does Linux display garbled characters in Chinese? How to set centos to display Chinese


More Linux Chinese display garbled characters? For related articles on how to set centos to display Chinese, please pay attention to the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)