> ## Content Index
> Fetch the complete content index at: https://blog.k3s.9zf.net/llms.txt
> Use this file to discover other available public pages before exploring further.

# debian10 修改系统语言
- URL: https://blog.k3s.9zf.net/debian10--e4-bf-ae-e6-94-b9-e7-b3-bb-e7-bb-9f-e8-af-ad-e8-a8-80/
- Published: 2021-06-05T13:05:05.000Z
- Updated: 2021-06-05T13:05:05.000Z
- Author: liu
- Tags: Linux, #wordpress, #Import 2026-10-29 06:11

开启root远程登录后操作，su后又奇怪问题。  
su 输入root密码  
vi /etc/ssh/sshd\_config  
将#PermitRootLogin prohibit-password的注释去掉，将prohibit-password改为yes

(1) 更新软件包列表  
`apt-get update`

(2）安装locales包，`apt-get install -y locales`。安装完成后会自动生产/etc/locale.gen

(3) 去掉/etc/locale.gen文件中zh\_CN.UTF-8所在行前面的注释，  
`sed -i 's/^# *(zh_CN.UTF-8)/1/' /etc/locale.gen`  
(4) 运行`locale-gen`命令  
(5) 在\~/.bashrc中设置LC\_ALL、LANG、LANGUAGE  
`  
echo "export LC_ALL=zh_CN.UTF-8" >> ~/.bashrc  
echo "export LANG=zh_CN.UTF-8" >> ~/.bashrc  
echo "export LANGUAGE=zh_CN.UTF-8" >> ~/.bashrc`

(6) `source ~/.bashrc`