Home  >  Article  >  Operation and Maintenance  >  How to modify the language in linux

How to modify the language in linux

WBOY
WBOYOriginal
2022-01-27 13:43:2216278browse

Method: 1. Use the "vi /etc/sysconfig/i18n" command to set the "LANG" item content, and modify the language globally after restarting; 2. Use the export command to temporarily modify the language, the syntax is "export LANG=" language"".

How to modify the language in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to modify the language in Linux

Modify the default language of the Linux system:

1. Global modification:

All users have the same unified language setting

Modify the /etc/sysconfig/i18n file

  vi /etc/sysconfig/i18n

If you want to modify it to Chinese, change it to LANG="zh_CN.UTF-8"

If you want to modify it into English, change it to LANG="en_US.UTF-8"

After saving, restart the computer to take effect

2. Changes made by a single user will not affect different users

Method: Copy /etc/sysconfig/i18n to the home directory of the user you want to change

  [shengjk@localhost ~]$ cp /etc/sysconfig/i18n ~/.i18n

If you want to change it to Chinese, change it to LANG="zh_CN.UTF-8"

If you want to change it to English, change it to LANG="en_US.UTF-8"

After saving, restart the computer to take effect

3. Temporary modification in the terminal

Directly in Execute in the terminal:

  export LANG="zh_CN.UTF-8"    #中文
  export LANG="en_US.UTF-8"    #英文

Note: /etc/sysconfig/i18n stores the regional language settings of the system. i18n is the abbreviation of internationalization. There are exactly 18 letters between i and n

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to modify the language in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn