This article describes how to set up a Japanese language environment and input method. It only covers the general and recommended cases . For full details on alternatives (e.g. Japanese input on tty or less common input method frameworks), see their respective It does not cover setting up Japanese input on the console/tty.
To display Japanese characters, a Japanese (or Chinese) font must be installed. If text appears as gibberish on your screen, ensure you have an appropriate Japanese (Chinese can also suffice) font installed on your system.
- - Japanese OpenType/CFF fonts, style Gothic (sans-serif).
- - Japanese OpenType/CFF fonts, style Mincho (serif).
- - Google Noto CJK fonts.
- - Formal style Japanese Gothic (sans-serif) and Mincho (serif) fonts set; one of the highest quality open source font. Default of openSUSE-ja.
- - An updated version of ipafont.
- - A free Japanese kanji font, style Mincho (serif).
- - Japanese free TrueType font. This is outdated and not maintained any more, but may be defined as a fallback font on several environments.
- AUR - Japanese TrueType font obtained by mixing AUR and Open Sans
- 2channel Shift JIS art properly. AUR - Japanese fonts to show
- AUR - Modern Gothic style Japanese outline fonts. It includes all of Japanese Hiragana/Katakana, Basic Latin, Latin-1 Supplement, Latin Extended-A, IPA Extensions and most of Japanese Kanji, Greek, Cyrillic, Vietnamese with 7 weights (proportional) or 5 weights (monospace).
- AUR - Japanese Gothic fonts. Default of Debian/Fedora/Vine Linux
- AUR - KanjiStrokeOrders font that indicates the stroke order of characters.
See locale for details.
Locales are used to correctly display regional or language/locale-specific standards. To ensure the Japanese locale is enabled, confirm that
ja_JP.utf8 is in the output of:
$ locale -a
To enable the Japanese locale, uncomment
... #ja_JP.EUC-JP EUC-JP ja_JP.UTF-8 UTF-8 #ka_GE.UTF-8 UTF-8 ...
Afterwards, regenerate your locale:
To type Japanese characters using a Western keyboard, an input method (or input method editor (IME)) is required to convert rōmaji into kana or kanji.Wikipedia:Romanization_of_Japanese To conveniently switch between different IMEs (e.g. to switch between English and Japanese input), IMEs often function as part of an Input Method Framework (IMF) to enable easily switching between different keyboard layouts.
Input Method Framework (IMF)
The most common IMFs are IBus (more common for GTK-based environments) and Fcitx5 (more common for Qt-based environments), which support all available Japanese IMEs. For a full overview of IMFs and supported IMEs, see this table. This article only briefly covers installation and configuration of #Fcitx5 and #IBus.
- The Fcitx package has been superseded by Fcitx5 since November 2020, and Fcitx has been put in maintenance mode. Users are recommended to use Fcitx5 instead of Fcitx.
- input method modules for GTK and Qt applications, and a configuration tool. This covers most cases. only contains the basic framework, while the group also includes
- The GTK and Qt applications. If you are noticing issues, you can install AUR, AUR, and/or for Qt4, Qt6, and date and time support respectively. group supports most
- Fcitx ships with a limited number of themes, which can be configured using the config tool. For more details on themes and appearance, see Fcitx5#Themes for more themes and information.
To enable Fcitx5, configure at least the following environment variables:
GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx
fcitx5even if using Fcitx5.
To enable IBus, configure at least the following environment variables:
GTK_IM_MODULE=ibus QT_IM_MODULE=ibus XMODIFIERS=@im=ibus
Input Method Editor (IME)
From the project's home page:
- Mozc is a Japanese input method editor (IME) designed for multi-platform such as Android OS, Apple OS X, Chromium OS, GNU/Linux and Microsoft Windows. This OpenSource project originates from Google Japanese Input.
Install the Mozc version for the IMF of your choosing (e.g. for Fcitx5 or AUR for IBus support}}).
Anthy is supported or built into most IMFs, though it is effectively dead.
Install the Anthy version for the IMF of your choosing (e.g. for Fcitx5 or for IBus support).
Simple Kana to Kanji (SKK) is a basic kana to kanji conversion method based on Emacs. It was designed by Dr. Masahiko Sato (Professor Emeritus, Kyoto University) (old link) and created in 1987. A unique feature of SKK is that it converts words one by one (single-word conversion), without analysing syntax or grammar.
Install the libskk version for the IMF of your choosing (e.g. for Fcitx5 or for IBus support).
From the project's GitHub page:
- libkkc provides a converter from Kana-string to Kana-Kanji-mixed-string. It was named after kkc.el in GNU Emacs, a simple Kana Kanji converter, while libkkc tries to convert sentences in a bit more complex way using N-gram language models.
Install the libkkc version for the IMF of your choosing (e.g. for Fcitx5 or for IBus support).
Google CGI API for Japanese Input
Available IM frameworks: uim
Google CGI API for Japanese Input (Google-CGIAPI-Jp) is CGI service to provide Japanese conversion on the Internet by Google. It can be used on web browser. Its conversion engine seems to be equivalent to Google Japanese Input, so conversion quality is probably better than Mozc.
You can use it via uim. Choose "Google-CGIAPI-Jp" on uim-im-switcher-gtk/gtk3/qt4 or uim-pref-gtk/gtk3/qt4.