https://access.redhat.com/solutions/3533681
SOLUTION UNVERIFIED - 已更新 2018年七月19日02:20 -
环境
- Red Hat Enterprise Linux 7
问题
-
How to set
LC_ALLin Red Hat Enterprise Linux 7? -
How to set
LC_ALLto persist after system reboot?
决议
- Append
LC_ALLand the required locale to/etc/environmentfile and log out for the changes to take effect.
For Example:
[root@example ~]# locale
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
[root@example ~]# cat /etc/locale.conf
LANG="en_AU.UTF-8"
- To set
LC_ALL=en_US.UTF-8append this entry in/etc/environment
[root@example ~]# cat /etc/environment
LC_ALL=en_US.UTF-8
Logout and then log in for the effect to take place
[root@example ~]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
- This changes can also be performed in
/etc/locale.confhowever, the Lang parameter will not change and if the output of#localecommand is checked, it will show the original value. To avoid confusion, it is better to modify/etc/environment
博客围绕 Red Hat Enterprise Linux 7 系统展开,提出如何设置语言以及如何让设置在系统重启后仍生效的问题。给出的解决方案是在特定文件中添加所需语言设置并注销使更改生效,还指出在另一处操作虽可行但可能有混淆,建议修改特定文件。
1033

被折叠的 条评论
为什么被折叠?



