In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Linux how to modify the character set, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
The way to modify the character set: 1, directly set the "export LANG= character set"; 2, open the "/ etc/sysconfig/i18n" file, set the character set "SYSFONT=" latarcyrheb-sun16 "needed by" LANG= ".
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
First, view the 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="
Second, modify the character set
(1) modify the method of setting variables directly, which only works for the temporary shell.
Export LANG=zh_CN.UTF-8
(2) modify the file mode, which is permanently effective to this machine by modifying / etc/sysconfig/i18n file control.
[root@devhxyw03 ~] # vim / etc/sysconfig/i18nLANG= "zh_CN.GBK" SYSFONT= "latarcyrheb-sun16" ~ ~ [root@devhxyw03 ~] # source / etc/sysconfig/i18n
(3) modify the. bash_profile file under the current user's home directory. After source makes the file effective, it will take effect permanently for the current user.
Export LANG=zh_CN.UTF-8, after reading the above, have you mastered how linux modifies the character set? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.