解决 Debian 下中文乱码问题

loskyertt Unknown

1.安装语言包

首先需要安装locales这个软件包:

1
apt install locales

然后执行下面命令并配置语言环境:

1
dpkg-reconfigure locales

2.修改配置

修改~/.bashrc文件:

1
nano ~/.bashrc

添加:

1
2
3
export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN:zh
export LC_ALL=zh_CN.UTF-8

然后执行:

1
source ~/.bashrc

3.参考链接

  • Title: 解决 Debian 下中文乱码问题
  • Author: loskyertt
  • Created at : 2025-01-03 19:16:06
  • Updated at : 2025-01-03 13:18:05
  • Link: https://redefine.ohevan.com/2025/01/03/Debian中文乱码/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments
On this page
解决 Debian 下中文乱码问题