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

Source to make it effective when modifying a character set

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

Share

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

= = copyright notice:

#

All the contents of this article come from the study summary of the author Liu Chunkai, and it is forbidden to forward and use it without my permission.

QQ:1151887353

E-mail:dakai517@163.com 1151887353@qq.com

# = = source makes it effective when modifying a character set

1.1 View the current character set of the system

[root@oldboyedu36-01 ~] # echo $LANGen_US.UTF-8

1.2 View character set profile

[root@oldboyedu36-01```] # cat / etc/sysconfig/i18nLANG= "en_US.UTF-8" SYSFONT= "latarcyrheb-sun16"

1.3 backing up character set files

[root@oldboyedu36-01 ~] # cp / etc/sysconfig/i18n / etc/sysconfig/i18n.bak

1.4 check whether the configuration file is backed up

[root@oldboyedu36-01 ~] # ll / etc/sysconfig/ | grep i18n Murray RW Murray. 1 root root 47 May 11 02:35 i18n Murray RW Murray Ruby Murray. 1 root root 47 May 11 03:13 i18n.bak

1.5 modify character set file

[root@oldboyedu36-01 ~] # sed-I's zh_CN.UTF-8 = "en_US.UTF-8" # LANG= "zh_CN.UTF-8" # g'/ etc/sysconfig/i18n

1.6 check whether the character set file is modified

[root@oldboyedu36-01 ~] # cat / etc/sysconfig/i18nLANG= "zh_CN.UTF-8" SYSFONT= "latarcyrheb-sun16"

1.7 if you do not source the profile

At this time: the system character set is still displayed in English, and the change does not take effect; [root@oldboyedu36-01 ~] # echo $LANGen_US.UTF-8You have mail in / var/spool/mail/root

At this point, you can detect the role of source:

1.7.1 No source / etc/sysconfig/i18n configuration file, log in again after exiting xshell

Last login: Thu May 11 02:36:03 2017 from 10.0.0.1 guarantee that the server will never go down! [root@oldboyedu36-01 ~] # echo $LANGzh_CN.UTF-8 description: you can see that the modified file takes effect after disconnecting the xshell reconnection

1.7.2 execute source / etc/sysconfig/i18n configuration file

[root@oldboyedu36-01 ~] # source / etc/sysconfig/i18n [root@oldboyedu36-01 ~] # echo $LANGzh_CN.UTF-8 description: in the case of an open xshell connection, the source configuration file will take effect immediately

1.8 after the server is restarted, it will take effect permanently

[root@oldboyedu36-01 ~] # rebootLast login: Thu May 11 18:51:21 2017 guarantee that the server will never go down! [root@oldboyedu36-01 ~] # echo $LANGzh_CN.UTF-8 [root@oldboyedu36-01 ~] # cat / etc/sysconfig/i18nLANG= "zh_CN.UTF-8" SYSFONT= "latarcyrheb-sun16"

1.9 Summary

1. After modifying the character set configuration file, it will not take effect immediately; 2. After modifying the character set configuration file, source will make it effective immediately; 3. After modifying the character set configuration file, the remote connection software will also take effect after re-login, and it will take effect every time it is disconnected and reconnected; 4. Source only makes it effective immediately and does not affect the configuration file after restarting the server. 5. The principle of restarting the server to make the configuration file take effect involves loading the kernel and program files of the boot system, which is not discussed here. 6. Source is for not restarting or re-logging in now.

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