How to Set Up Japanese Keyboard on Ubuntu: Mozc Installation & Troubleshooting

1. Checking and Installing the Japanese Input Environment

To comfortably operate Ubuntu in Japanese, it’s essential to set up the Japanese input environment correctly. This section explains how to check your current input method and the installation procedure for the Japanese input method “Mozc.”

How to Check Your Current Input Method

First, let’s check which input method is currently used in your Ubuntu environment. Ubuntu generally uses a framework called “IBus (Intelligent Input Bus).”

Follow these steps to check:

  1. Open “Settings” from the “Applications Menu” in the bottom left corner.
  2. Select “Region & Language.”
  3. Check the “Input Sources” section to see if “Japanese (Mozc)” or “Japanese (Anthy)” etc., are already added.

If Japanese input is not displayed here, you need to install Mozc using the following steps.

Installation Procedure for the Japanese Input Method “Mozc”

Mozc is an open-source Japanese conversion engine based on Google Japanese Input and is widely used as the Japanese input environment in Ubuntu.

You can install it using the following steps:

  1. Open the terminal.
  2. Enter the following commands in order:
sudo apt update
sudo apt install ibus-mozc

apt update is a command to update the package information, and apt install installs the ibus-mozc package.

  1. After the installation is complete, log out or restart your system to apply the changes.

Confirming Input Method Activation

After logging back in, open the “Region & Language” settings screen again and check if “Japanese (Mozc)” has been added to the input sources. If it’s displayed here, the installation was successful.

If “Japanese (Mozc)” is not found, you can add it by pressing the “+” button to add an input source.

侍エンジニア塾

2. Adding Japanese (Mozc) to Input Sources

After Mozc is installed, you need to add “Japanese (Mozc)” to Ubuntu’s input sources to actually use Japanese input. If you don’t perform this step, you won’t be able to start Japanese input even after installation.

Here, we will explain how to add it to the input sources in an easy-to-understand manner.

Steps to Add Input Source from “Region & Language”

  1. Open “Settings” from the “Applications Menu” in the bottom left corner of the screen.
  2. Click on “Region & Language” in the sidebar.
  3. Click the “+” button below the “Input Sources” section.

A list of various languages and input methods will then be displayed.

  1. Type “Japanese” to search, or select “Japanese” from the categories.
  2. Select “Japanese (Mozc)” from the list and click “Add.”

This will add “Japanese (Mozc)” to your input sources, and you will be able to input Japanese by switching your keyboard.

Pay Attention to the Order of Input Sources

Input sources are prioritized in the order they are added. For example, if “Japanese (Mozc)” is at the top, Japanese input may become the initial state when you start your computer. This can be convenient or inconvenient depending on the situation, so it’s a good idea to adjust the order according to your needs.

You can change the order by dragging and dropping in the input sources list.

Check the Input Indicator

The panel (top bar) in the upper right corner of the screen displays an indicator showing the current input source (e.g., “EN” or “あ”). Clicking here allows you to easily switch between available input sources.

If “Japanese (Mozc)” is displayed here, the setup is complete.

3. How to Switch to Japanese Input

Once you have completed the installation of Mozc and added it to your input sources, you will finally be able to switch to Japanese input. This section provides a detailed explanation of how to switch between Japanese and English input in Ubuntu, as well as how to customize keyboard shortcuts.

Default Switching Methods

Ubuntu has pre-set keyboard shortcuts for easily switching input sources. To enable Japanese input, try the following:

  • “Super (Windows key) + Space”
  • “Hankaku/Zenkaku” key (on Japanese layout keyboards)

Usually, pressing these keys will switch the input indicator from “EN (English)” to “あ (Japanese).” After switching, you will be able to type in Japanese.

Note: The “Hankaku/Zenkaku” key can be used on Japanese layout keyboards, while “Super + Space” is common on English layout keyboards. Use the appropriate shortcut for your keyboard.

Checking and Changing the Current Shortcut

If you want to check the keyboard shortcut used in your environment, you can access the settings screen using the following steps:

  1. Open “Settings” → “Keyboard.”
  2. Look for the “Switch to next input source” item.
  3. Here you can see the currently assigned shortcut.

If the shortcut key conflicts with another shortcut or if you want to change it to your preference, you can reassign the key on the same screen.

Customization is Also Possible in Mozc Settings

Mozc itself also has key setting options. To open the Mozc settings screen, perform the following steps:

  1. Click on the input indicator in the upper right corner of the screen (e.g., “あ” or “EN”).
  2. Select “Mozc Settings” from the displayed menu.

Selecting the “Keymap” tab in Mozc Settings allows you to finely customize the keys used for switching input modes and operating the candidate window. For example, the following key settings are possible:

  • Alphanumeric input ⇔ Japanese input: Ctrl + Space
  • Hiragana ⇔ Katakana: F7 / F8

Such customization allows you to create an input environment that is easy for you to use.

Visually Confirming the Input Mode Status

The most reliable way to determine whether the input is in English or Japanese mode is to look at the indicator in the upper right corner of the screen.

  • “EN” → English input
  • “あ” or “A” → Japanese input (Mozc)

If this display is not switching, double-check your shortcut key settings and the priority of your input sources.

4. Troubleshooting

Even after setting up Japanese input in Ubuntu, you may encounter issues where you cannot switch or input Japanese correctly. This section explains common problems and their solutions on a case-by-case basis.

Points to Check When You Cannot Input Japanese

1. Mozc is Not Installed Correctly

First, let’s reconfirm whether ibus-mozc is installed using the following command:

dpkg -l | grep ibus-mozc

If nothing is displayed, reinstall it using the following commands:

sudo apt update
sudo apt install ibus-mozc

After installation, be sure to log out and log back in or restart your computer. Mozc may not be enabled unless you log back in.

2. “Japanese (Mozc)” is Not Added to Input Sources

Check “Settings” → “Region & Language” and see if “Japanese (Mozc)” is included in “Input Sources.” If it’s not found, add it again by clicking the “+” button.

Keyboard Shortcuts Do Not Respond

1. The Shortcut Conflicts with Another Application

If the key assigned to “Switch to next input source” in Ubuntu’s keyboard settings conflicts with another shortcut, switching may not work correctly.

Try changing it to a non-conflicting key (e.g., Ctrl + Space) from “Settings” → “Keyboard” → “Switch to next input source.”

2. The Input Mode Status is Difficult to See Visually

Especially on English layout keyboards, switching may not be intuitive because there is no “Hankaku/Zenkaku” key. Getting into the habit of checking the input indicator in the upper right corner of the screen (e.g., “EN” or “あ”) can prevent confusion about the mode.

Candidates Are Not Displayed / Cannot Convert During Input

This may indicate that the Mozc process is not running correctly. Restart the Mozc-related process using the following command:

ibus restart

After that, try typing Japanese again in a terminal or editor to see if conversion candidates are displayed.

Last Resort: Resetting Settings

If you still cannot resolve the issue, you can try resetting the settings for IBus and Mozc and then reconfiguring them.

rm -r ~/.config/ibus
ibus restart

However, the above command will initialize your personal IBus settings, so be careful if you have other custom configurations.

5. Frequently Asked Questions (FAQ)

Setting up Japanese input in Ubuntu can be confusing for beginners. Here, we have compiled a list of frequently asked questions from our readers in a Q&A format. Please refer to this when you encounter problems.

Q1. How do I enable Japanese input in Ubuntu?

A.
First, you need to install ibus-mozc. Execute the following commands in the terminal:

sudo apt update
sudo apt install ibus-mozc

After that, add “Japanese (Mozc)” to the input sources from “Settings” → “Region & Language.” After logging out and back in or restarting your computer, you will be able to use Japanese input.

Q2. How do I switch to Japanese input using keyboard shortcuts?

A.
By default, you can switch using “Super (Windows key) + Space” or the “Hankaku/Zenkaku” key. However, these may not work depending on your keyboard type. In that case, you can customize the shortcut in “Settings” → “Keyboard.”

You can also assign a shortcut like “Ctrl + Space” to switch input modes in Mozc settings.

Q3. Japanese input suddenly stopped working. What should I do?

A.
First, check the following in order:

  1. Is Mozc installed?
  2. Is “Japanese (Mozc)” present in the input sources?
  3. Try restarting Mozc with ibus restart.
  4. Is the shortcut key conflicting with another shortcut?

If it still doesn’t work, resetting the IBus settings may solve the problem (note that this will initialize your settings).

Q4. Can I use a Japanese input system other than Mozc?

A.
Yes, you can. Ubuntu also supports “Anthy” and “fcitx-mozc.” However, Mozc is highly rated for its conversion accuracy and comfortable Japanese input. We especially recommend Mozc for beginners.

Q5. Conversion candidates are not displayed during input. Why?

A.
The Mozc process may not be working correctly. Try restarting it with the following command:

ibus restart

Also, conversion candidates may not be displayed correctly depending on the active window. It’s a good idea to check if it works in another text editor.

年収訴求