Ubuntu中设置语言环境

本文介绍如何使用dpkg-reconfigure命令在Debian系统中重新配置已安装的包,特别聚焦于设置语言环境。通过sudo dpkg-reconfigure locales命令,用户可以多选所需的语言环境,如en_US.UTF-8和zh_CN.UTF-8,并设置默认语言环境。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Command

  • 查看dpkg-reconfigure的功能
$ whatis dpkg-reconfigure 
dpkg-reconfigure (8) - reconfigure an already installed package

Debian package reconfigure - 重新配置已安装好的包。
这个命令在整个Debian系的Linux发行版中都可以使用,如Debian, Ubuntu, Mint, Kali等。

  • 设置语言环境
sudo dpkg-reconfigure locales
  • 什么是Locales

Locales are a framework to switch between multiple languages and allow users to use their language, country, characters, collation order, etc.
Please choose which locales to generate. UTF-8 locales should be chosen by default, particularly for new installations. Other character sets may be useful for backwards compatibility with older systems and software.
Locales to be generated:

  • 多选-选择需要用到的语言环境
    选中两项即可:

en_US.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8

  • 选择默认的语言环境

Many packages in Debian use locales to display text in the correct language for the user. You can choose a default locale for the system from the generated locales.
This will select the default language for the entire system. If this system is a multi-user system where not all users are able to speak the default language, they will experience difficulties.
Default locale for the system environment:
即:选择一个默认的语言环境。
选择zh_CN.UTF-8 UTF-8即可。

  • 重启机器,使最新配置生效。reboot
  • 开机会提示:要不要更新home目录下的几个常用文件夹的名称。
    我选不要。Don't ask me again Keep Old Name
    在这里插入图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值