Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to set the Chinese language in Linux

Shulou Source: shulou.com Published: 2022-06-01 21:42:25 11月17日 Update

This article mainly introduces how to set up Linux Chinese language, the article is very detailed, has a certain reference value, interested friends must read!

Linux is a free-to-use and freely distributed UNIX-like operating system, is a POSIX-based multi-user, multitasking, multi-threaded and multi-CPU operating system, using Linux to run major Unix tools, applications and network protocols.

How to set Linux system Chinese language?

When many friends start using Linux, they will encounter a problem, that is, when the terminal inputs commands, it displays garbled characters in Chinese. This is usually due to the absence of a Chinese language pack or a problem with the default language settings. Today we take centos as an example, how to operate Linux to view languages and set up methods to modify languages.

1. How to view and set the system language pack in Linux

1. View the current system language

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

2. View installed language packs

To check whether 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.

What if there is no Chinese language

You can download and install the Chinese language package yum groupinstall chinese-support online (download it from other computers if you cannot connect to the Internet, upload it)

II. How to change the system language to Chinese

Temporary change of language

If you are only temporarily changing the locale of the linux system, you can set LANG= language name by typing, such as Chinese is

Zn_CN. UTF-8 (Note that I originally have Chinese here, and I temporarily set it to English

2. Modify the system default language

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

For example, Vi /etc/sysconfig/i18n (note that after the system is fixed, restart the system)

III. Other matters needing attention

If you still can't modify the Chinese language according to the above method, pay attention to the code selected by your link terminal.

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

After setting, check the previous garbled file again to see that it is displayed in Chinese

The above is "Linux how to set the Chinese language" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Tags: Language Chinese system terminal input method operating system garbled content can be passed commands guys buddies that is time articles codes questions choices no Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information macOS MySQL Shulou Tech Info Apple