How to input Chinese characters in CentOS terminal?

To input Chinese in the CentOS terminal, you can follow these steps:

  1. Make sure that your CentOS system has Chinese fonts and Chinese input method installed. You can use the following command to install Chinese fonts:
  2. Please install the following fonts using the yum command with administrative privileges: cjkuni-fonts-common, cjkuni-fonts-ukai, and cjkuni-fonts-uming.
  3. Install the Chinese input method. You can choose to install the Fcitx input method framework and its corresponding Chinese input method modules. Run the following command to install Fcitx and its modules:
  4. Please use the command “sudo yum install fcitx fcitx-configtool fcitx-table-wubi fcitx-table-wbpy fcitx-table-wubi-large fcitx-table-wbpy-large -y” to install the necessary packages.
  5. Set the input method in the terminal. Run the following command to edit the terminal configuration file:
  6. Edit or open the file named “.bashrc” using the text editor “nano.”
  7. Add the following lines of code at the end of the file:
  8. Set the XMODIFIERS variable to “@im=fcitx”, and set both QT_IM_MODULE and GTK_IM_MODULE variables to xim. Also, set the XIM variable to fcitx.
  9. Save and close the file. Press Ctrl + X, then press Y to save the changes.
  10. Restart the terminal, then press Ctrl + Space to switch input method, choose your preferred Chinese input method.

Now you can input Chinese in the CentOS terminal.

bannerAds