最小化安装的centos8,安装的时候选择的语言是中文,但是安装好后,登录的时候提示"-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)",虽然不影响使用,但是总是感觉别扭。
[wolf@wulaoer.org 🔥🔥🔥🔥 ~ ]$ ssh root@10.211.55.25 The authenticity of host '10.211.55.25 (10.211.55.25)' can't be established. ED25519 key fingerprint is SHA256:R8dcuRPaSozaIb/JnpoEBYOMq5uVeG2VDmK9tQZlJPQ. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '10.211.55.25' (ED25519) to the list of known hosts. root@10.211.55.25's password: -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) -bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
每次登录的时候都会这个提示,主要原因是因为没有中文包,需要重新安装一下,然后把中文配置到环境变量中。
dnf install -y langpacks-zh_CN langpacks-en langpacks-en_GB cat >/etc/profile.d/locale.sh<<-EOF export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 export LC_COLLATE=C export LC_CTYPE=en_US.UTF-8 EOF source /etc/profile.d/locale.sh
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏