Steps to change CentOS to Chinese: Set the locale: LANG=zh_CN.UTF-8 Update the system: sudo yum update Change the display language: sudo systemctl restart gdm Install Chinese input method (optional): ibus, Chinese (Simplified), Pinyin
How to change CentOS to Chinese
Step 1: Set the locale
- Open a terminal and enter the following command:
<code>sudo vi /etc/environment</code>
Copy after login
- Add the following lines to the file:
<code>LANG=zh_CN.UTF-8</code>
Copy after login
- Press the Esc key, enter
:wq
and press Enter to save the changes.
Step 2: Update the system
- Enter the following command:
<code>sudo yum update</code>
Copy after login
- The system will automatically download and install the latest packages, including required language packs.
Step 3: Change the display language
- Open the terminal and enter the following command:
<code>sudo systemctl restart gdm</code>
Copy after login
- After logging back into the system, the display language should have changed to Chinese.
Step 4: Install Chinese input method (optional)
- Open the "Activities" menu on the desktop.
- Enter "input method" in the search box.
- Select "Input Method Settings" and enable "ibus".
- Click the "Add" button and select "Chinese (Simplified)".
- Select the "Add" button and select "Pinyin".
Tips:
- If the system does not automatically install the Chinese language pack, you can run the following command to install it manually after completing step one:
<code>sudo yum install centos-release-x86_64-Chinese -y
sudo yum install centos-x86_64-Chinese -y</code>
Copy after login
- If the English prompt still appears after changing the display language, please check whether the correct locale is set in the
~/.xprofile
file.
The above is the detailed content of How to change centos to Chinese. For more information, please follow other related articles on the PHP Chinese website!