62 lines
715 B
Markdown
62 lines
715 B
Markdown
|
升级更新现有的包(可选)
|
||
|
```
|
||
|
apt update && sudo apt upgrade -y
|
||
|
|
||
|
```
|
||
|
|
||
|
安装语言包和字体
|
||
|
```
|
||
|
apt install language-pack-zh-hans fonts-noto-cjk
|
||
|
```
|
||
|
|
||
|
生成本地化文件
|
||
|
```
|
||
|
locale-gen zh_CN.UTF-8
|
||
|
```
|
||
|
|
||
|
设为默认语言
|
||
|
```
|
||
|
echo "LANG=zh_CN.UTF-8" | sudo tee /etc/locale.conf
|
||
|
```
|
||
|
|
||
|
设置所有变量(可选)
|
||
|
```
|
||
|
vim /etc/environment
|
||
|
```
|
||
|
|
||
|
编辑以下内容
|
||
|
```
|
||
|
LANG="zh_CN.UTF-8"
|
||
|
LANGUAGE="zh_CN:zh"
|
||
|
LC_ALL="zh_CN.UTF-8"
|
||
|
```
|
||
|
|
||
|
刷新
|
||
|
```
|
||
|
source /etc/environment
|
||
|
```
|
||
|
|
||
|
验证
|
||
|
```
|
||
|
locale
|
||
|
```
|
||
|
|
||
|
重启系统对所有应用生效
|
||
|
```
|
||
|
reboot
|
||
|
```
|
||
|
|
||
|
配置SSH登录提示为中文(可选)
|
||
|
```
|
||
|
vim /etc/ssh/sshd_config
|
||
|
```
|
||
|
|
||
|
编辑
|
||
|
```
|
||
|
AcceptEnv LANG LC_*
|
||
|
```
|
||
|
|
||
|
重启SSH服务
|
||
|
```
|
||
|
sudo systemctl restart ssh
|
||
|
```
|