Leif160519的blog Leif160519的blog

——————

目录
Ubuntu 服务器支持中文显示即输入
/  

Ubuntu 服务器支持中文显示即输入

检查本机已有的语言包

locale -a

安装语言包

首先是修改locale.gen文件

sudo vim /etc/locale.gen 

zh_CN.GBK GBK zh_CN.UTF8 UTF8的注释去掉,或者直接添加这两行内容。
然后使用sudo locale-gen下载语言。
修改默认语言编码

sudo dpkg-reconfigure locales 

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

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


“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/08/22/1566472453087.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!