Leif160519的blog Leif160519的blog

——————

目录
ubuntu服务器支持中文显示及输入
/  

ubuntu服务器支持中文显示及输入

1.检查本机已有的语言包

root@ubuntu:~# locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX
zh_CN.utf8
zh_SG.utf8

2.安装语言包

2.1修改locale.gen文件

sudo nano /etc/locale.gen

zh_CN.GBK GBK zh_CN.UTF8 UTF8的注释去掉,或者直接添加这两行内容。

2.2下载语言。

sudo locale-gen

2.3修改默认语言编码

sudo dpkg-reconfigure locales

这一步将会选择默认的系统语言,选择所有zh开头的,以及后缀是utf8的。

2.4重启服务器

注意确认重启服务器是否会有其他影响,免责声明-.-。服务器就可以显示并输入中文了。


“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill

标  题ubuntu服务器支持中文显示及输入
作  者Leif160519
出  处https://github.icu/articles/2019/09/16/1568625607057.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!