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 modify the linux character set

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

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "how to modify the linux character set", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to modify the linux character set" article.

Modification method: 1, execute the "export LANG= character set" statement, can temporarily modify the character set; 2, open the "/ etc/sysconfig/i18n" file, set the "LANG=" character set "" and "SYSFONT=" latarcyrheb-sun16 "", can permanently modify the character set.

The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Linux modifies character set

1. Temporary modification

The method of setting variables directly is modified, which only works for the temporary shell.

Export LANG=zh_CN.UTF-8

2. Permanent effect

Modify the file mode, through the modification / etc/sysconfig/i18n file control, permanent effect on this machine

[root@devhxyw03 ~] # vim / etc/sysconfig/i18nLANG= "zh_CN.GBK" SYSFONT= "latarcyrheb-sun16" [root@devhxyw03 ~] # source / etc/sysconfig/i18n

Extended knowledge: linux View character set

Several common methods:

(1)

[root@devhxyw03 ~] # echo $LANG zh_CN.GBK

(2)

[root@devhxyw03 ~] # env | grep LANG LANG=zh_CN.GBK

(3)

[root@devhxyw03 ~] # export | grep LANG declare-x LANG= "zh_CN.GBK"

(4)

[root@devhxyw03 ~] # localeLANG=zh_CN.GBKLC_CTYPE= "zh_CN.GBK" LC_NUMERIC= "zh_CN.GBK" LC_TIME= "zh_CN.GBK" LC_COLLATE= "zh_CN.GBK" LC_MONETARY= "zh_CN.GBK" LC_MESSAGES= "zh_CN.GBK" LC_PAPER= "zh_CN.GBK" LC_NAME= "zh_CN.GBK" LC_ADDRESS= "zh_CN.GBK" LC_TELEPHONE= "zh_CN.GBK" LC_MEASUREMENT= "zh_CN.GBK "LC_IDENTIFICATION=" zh_CN.GBK "LC_ALL=" is the content of this article on "how to modify the linux character set" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.

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