这篇文章主要讲解了“ubuntu怎么更改locale”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“ubuntu怎么更改locale”吧!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # locale LANG=en_US.UTF–8 LC_CTYPE=“en_US.UTF-8” LC_NUMERIC=“en_US.UTF-8” LC_TIME=“en_US.UTF-8” LC_COLLATE=“en_US.UTF-8” LC_MONETARY=“en_US.UTF-8” LC_MESSAGES=“en_US.UTF-8” LC_PAPER=“en_US.UTF-8” LC_NAME=“en_US.UTF-8” LC_ADDRESS=“en_US.UTF-8” LC_TELEPHONE=“en_US.UTF-8” LC_MEASUREMENT=“en_US.UTF-8” LC_IDENTIFICATION=“en_US.UTF-8” LC_ALL= |
现在需将en_US.UTF-8改为zh_US.UTF-8,en改为cn。编辑配置文件如下:
1 2 3 4 | $ sudo vi /etc/default/locale LANG=“zh_CN.UTF-8” LANGUAGE=“zh_CN:zh” LC_ALL=“zh_CN.UTF-8” |
保存后执行locale查看,如果有报如下错误 locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory 说明没有安装
1 | $ locale –a |
1 | # locale-gen zh_CN.UTF-8 |
查看:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # locale LANG=zh_CN.UTF–8 LANGUAGE=zh_CN:zh LC_CTYPE=“zh_CN.UTF-8” LC_NUMERIC=“zh_CN.UTF-8” LC_TIME=“zh_CN.UTF-8” LC_COLLATE=“zh_CN.UTF-8” LC_MONETARY=“zh_CN.UTF-8” LC_MESSAGES=“zh_CN.UTF-8” LC_PAPER=“zh_CN.UTF-8” LC_NAME=“zh_CN.UTF-8” LC_ADDRESS=“zh_CN.UTF-8” LC_TELEPHONE=“zh_CN.UTF-8” LC_MEASUREMENT=“zh_CN.UTF-8” LC_IDENTIFICATION=“zh_CN.UTF-8” LC_ALL=zh_CN.UTF–8 |
感谢各位的阅读,以上就是“ubuntu怎么更改locale”的内容了,经过本文的学习后,相信大家对ubuntu怎么更改locale这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。