记录 Ubuntu18.04 中文乱码,解决方法
发表于:2022-02-23 |

1.查看现有语言环境

locale

2.如果没有 en_US.UTF-8 则安装

locale-gen en_US.UTF-8

3.可用语言环境

locale -a

4.永久更改编码,运行以下命令。 注意 如果是 docker 容器,重启会无效

echo “export LC_ALL=en_US.UTF-8” >> /etc/profile
docker 镜像 运行以下代码

echo “export LC_ALL=en_US.UTF-8” >> /root/.bashrc

5.要让刚才的修改马上生效,需要执行以下命令 完成

source /etc/profile

上一篇:
Elasticsearch built-in security features are not enabled去除
下一篇:
mysql查看编码格式以及修改编码格式