Install pinyin input method in ubuntu

Problem

You want to input Chinese pinyin input method in Ubuntu.

Solution

Step 1

1
sudo apt install fcitx fcitx-sunpinyin

Step 2

Go to system settings, then “Region & Language”, click “Manage Installed Languages”, install Chinese language and change “Keyboard input method system” to “fcitx”.

Then in the “Input sources”, click the “+” button, select “Chinese” then “Chinese Pinyin”.