Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of displaying Chinese garbled code on the command line of CentOS terminal

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "CentOS terminal command line display Chinese garbled problem how to solve", the article explained the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "CentOS terminal command line display Chinese garbled problem how to solve" it!

When installing CentOS, Chinese is selected. As a result, Chinese cannot be displayed on the terminal. It is all garbled. The solution:

Modify / etc/sysconfig/i18n, the content is

The code is as follows:

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= "lat0-sun16"

Just log out and log in again

Test method: enter the date command at the terminal to test, and if it is displayed in the following form, it means that it has been solved successfully.

The code is as follows:

# date

Monday, November 24, 2009, 12:09:00 CST

If there are no Chinese fonts in the system, please install Chinese fonts:

The code is as follows:

# yum install fonts-chinese.noarch

If the font file cannot be found, you can also install it with the rpm package.

Two packages supported in Chinese are required:

Fonts-chinese-3.02-12.el5.noarch.rpm

Ftp://ftp.muug.mb.ca/mirror/centos/5.4/os/x86_64/CentOS/fonts-chinese-3.02-12.el5.noarch.rpm

Fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm

Ftp://ftp.muug.mb.ca/mirror/centos/5.4/os/x86_64/CentOS/fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm

One is a Chinese font, and the other is a font display package.

After downloading, install it on the command line:

The code is as follows:

# rpm-ivh XXXX (XXXX represents the full name of the above two packages. Rpm doesn't know how to use it, does it? )

After the CentOS system installation is complete, restart it.

Thank you for your reading, the above is the "CentOS terminal command line display Chinese garbled problem how to solve" the content, after the study of this article, I believe you on the CentOS terminal command line display Chinese garbled problem how to solve this problem has a deeper understanding, the specific use of the need for everyone to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report