Article Title: solution to garbled setup in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Method 1: configure the SSH Tool
SecureCRT Chinese Version Configuration
[Global Options] → [default session] → [edit default settings] → [terminal] → [appearance] → [font] → [New 1010pt CHINESE_GB2312] → [character encoding UTF-8]
Putty Configuration
[Window] → [Appearance] → [Font settings] → [Change] → [Fixedsys CHINESE_GB2312]
[Window] → [Appearance] → [Translation] → [stored ed data assumed to be in which character set] → [Use font encoding UTF-8]
If it is frequently used, save these settings in the session.
Open putty. After the logon is successful, enter: export LC_ALL = 'zh _ CN. utf8' in the shell'
Method 2: configure the system
The operating system language is Chinese and displays Chinese Characters
Edit/etc/sysconfig/i18n to the following content:
LANG = "zh_CN.GB2312"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh"
SYSFONT = "latarcyrheb-sun16"
Or
LANG = zh_CN.GB18030
LANGUAGE = zh_CN.GB18030: zh_CN.GB2312: zh_CN
Export LANG LANGUAGE
In this way, you can enter and display Chinese characters on the terminal, and the original Chinese characters in the shell script are also fixed.
The operating system language is English and Chinese characters are displayed.
Edit/etc/sysconfig/i18n to the following content:
LANG = "en_US"
SUPPORTED = "en_US.UTF-8: en_US: en"
SYSFONT = "latarcyrheb-sun16"