- 1 1. Introduction
- 2 2. Choosing a Japanese Keyboard
- 3 3. Setting Up a Japanese Keyboard in Ubuntu
- 4 4. Troubleshooting
- 5 5. Frequently Asked Questions (FAQ)
- 5.1 Q1: Can I use the Caps Lock key to switch between Japanese and English input in Ubuntu?
- 5.2 Q2: Why does my keyboard layout reset after restarting Ubuntu?
- 5.3 Q3: Japanese input stopped working after an Ubuntu update. What should I do?
- 5.4 Q4: Japanese input doesn’t work in specific applications. Why?
- 5.5 Q5: What’s the best way to switch between Japanese and English input frequently?
- 6 6. Advanced: Using Multiple Keyboards and Languages
- 7 7. Conclusion
1. Introduction
Have you ever felt the need to configure a Japanese keyboard while using Ubuntu? Setting up the correct keyboard configuration is essential for a smooth Japanese typing experience in Linux’s versatile environment.
This article provides a step-by-step guide on how to set up a Japanese keyboard in Ubuntu, making it easy to understand even for beginners. We will also cover troubleshooting solutions and advanced usage tips to help you build a comfortable Japanese input environment.
Additionally, we will explain the differences between JIS and US keyboards and discuss their respective advantages, guiding you to the optimal setup for your needs. By the end of this guide, you should be able to type in Japanese smoothly on Ubuntu.
2. Choosing a Japanese Keyboard
To type in Japanese comfortably on Ubuntu, it’s important to understand the different types of keyboards available. The two main types are **JIS keyboards** and **US keyboards**, each with distinct features. Knowing these differences will help you choose the right one for your needs.
Differences Between JIS and US Keyboards
The **JIS keyboard** is the standard layout used in Japan, specifically designed for Japanese input. In contrast, the **US keyboard** is commonly used in English-speaking countries. Below is a comparison of their key features.
Feature | JIS Keyboard | US Keyboard |
---|---|---|
Enter Key Shape | Large and vertical | Horizontal |
Layout Differences | Has dedicated “Kana” and “Eisu” keys | Can repurpose “Caps Lock” key |
Setup Requirements | May require manual configuration in Ubuntu | Often works with default settings |
Which One Should You Choose?
- If you frequently type in Japanese:
A JIS keyboard is more convenient because it has dedicated **Kana** and **Eisu** keys, allowing for smooth input switching. - If you mainly program or type in English:
A US keyboard is recommended due to its simpler layout. It also follows a global standard, making it easier to use in different environments.

3. Setting Up a Japanese Keyboard in Ubuntu
To use a Japanese keyboard in Ubuntu, you need to follow the correct setup steps. Below is a beginner-friendly guide with detailed instructions.
3.1. Installing the Japanese Input Environment
First, you need to install the necessary tools for Japanese input. Ubuntu widely uses **ibus-mozc** as its Japanese input system.
Steps:
- Open the terminal (
Ctrl + Alt + T
). - Enter the following commands to install “Mozc”:
sudo apt update
sudo apt install ibus-mozc
- After installation, restart your system or restart IBus using the following command:
ibus restart
This completes the setup for the Japanese input environment.
3.2. Configuring the Keyboard Layout
Next, set the keyboard layout to Japanese. This step is particularly important if you are using a JIS keyboard.
Steps:
- Open the Settings app
- Select “Region & Language”
In the left menu, choose “Region & Language”. - Add an Input Source
- Click “Add Input Source” and select “Japanese (Mozc)”.
- If you are using a JIS keyboard, select “Japanese (JIS)”.
- Adjust Input Source Priority
Drag the Japanese input source to the top of the list.
3.3. Setting Up Shortcut Keys
To switch between Japanese and English input smoothly, set up shortcut keys.
Steps:
- Open the “Keyboard” settings
Go to the “Keyboard” section in the settings app. - Set up an input switch shortcut
By default, you can switch input using “Super + Space” or “Alt + Shift”. Modify it as needed. - Using the “Caps Lock” key
If you want to use the “Caps Lock” key for switching input, enter the following command:
gsettings set org.freedesktop.ibus.general.hotkey triggers "['Caps_Lock']"
This enables the shortcut key for input switching.

4. Troubleshooting
Sometimes, setting up a Japanese keyboard in Ubuntu doesn’t go as planned. This section provides clear solutions to common issues.
4.1. Japanese Input Doesn’t Work
Even after configuring the keyboard, input may remain in English.
Possible Causes & Solutions:
- Incorrect Input Source Settings
- Go to “Region & Language” in the settings and check if “Japanese (Mozc)” is selected.
- If necessary, add the input source again.
- IBus is Not Running
- Restart IBus using the following command:
ibus restart
- If the issue persists, log out and log back in.
- Mozc is Not Installed Properly
- Try reinstalling Mozc:
sudo apt purge ibus-mozc && sudo apt install ibus-mozc
4.2. Keyboard Layout is Incorrect
Sometimes, a JIS keyboard may be recognized as a US keyboard.
Solutions:
- Check Layout Settings
- Go to “Region & Language” and ensure “Japanese (JIS)” is selected.
- Use a Command to Set the Layout
- Use the following command to manually set the keyboard layout:
setxkbmap jp
4.3. Shortcut Keys Are Not Working
If the shortcut keys for switching input do not function properly, try the following solutions.
Solutions:
- Check the Settings
- Go to “Keyboard Shortcuts” in the **Settings** app and verify that the input switch keys are set correctly.
- Using Caps Lock for Switching
- To set **Caps Lock** as an input switch key, use the following command:
gsettings set org.freedesktop.ibus.general.hotkey triggers "['Caps_Lock']"
4.4. Japanese Input Doesn’t Work in Certain Apps
In some applications, Japanese input may not be recognized properly.
Solutions:
- Restart the Application
- Close and reopen the application to see if the issue is resolved.
- Restart IBus
- Run the following command:
ibus restart
- Check Compatibility
- Some older applications may not support IBus properly. In such cases, you can try an alternative input method like **fcitx**.

5. Frequently Asked Questions (FAQ)
Here are answers to common questions about setting up and using a Japanese keyboard in Ubuntu.
Q1: Can I use the Caps Lock key to switch between Japanese and English input in Ubuntu?
A:
Yes, you can. Follow these steps:
- Open the terminal and enter the following command:
gsettings set org.freedesktop.ibus.general.hotkey triggers "['Caps_Lock']"
- Now, you can use the **Caps Lock** key to switch input modes.
Q2: Why does my keyboard layout reset after restarting Ubuntu?
A:
If your settings reset after a reboot, they may not be saved permanently. To make them persistent, follow these steps:
- Open the keyboard configuration file for editing:
sudo nano /etc/default/keyboard
- Change the
XKBLAYOUT
value to your desired layout (e.g.,jp
for Japanese).
XKBLAYOUT="jp"
- Save the file and reboot your system.
Q3: Japanese input stopped working after an Ubuntu update. What should I do?
A:
Sometimes, updates may reset or remove settings. Try reinstalling the Japanese input system:
- Reinstall **ibus-mozc**:
sudo apt update
sudo apt install --reinstall ibus-mozc
- Restart IBus:
ibus restart
Q4: Japanese input doesn’t work in specific applications. Why?
A:
Some applications may not support **IBus**. Try these solutions:
- Restart the application.
- Use an alternative input method like **fcitx**.
Q5: What’s the best way to switch between Japanese and English input frequently?
A:
Using keyboard shortcuts is the most efficient method. The following options are recommended:
- Super + Space (default setting)
This allows you to switch input sources quickly. - Caps Lock key
You can configure **Caps Lock** for input switching using the method mentioned above.

6. Advanced: Using Multiple Keyboards and Languages
Ubuntu allows you to switch between multiple keyboard layouts and languages easily. This section explains how to efficiently manage multiple languages.
6.1. Adding Multiple Keyboard Layouts
To configure multiple keyboard layouts, such as **Japanese and US keyboards**, follow these steps:
Steps:
- Open Settings
Launch the **Settings** app. - Select “Region & Language”
Choose “Region & Language” from the left menu. - Add an Input Source
- Click “Add Input Source” and choose the layout you want (e.g., **English (US)**).
- Adjust the Priority
Reorder the list based on your usage preference.
6.2. Configuring Shortcut Keys for Language Switching
To switch between multiple languages quickly, set up shortcut keys.
Default Shortcut:
Super
+Space
This cycles through input sources.
Customizing Shortcuts:
- Open **Settings** → **Keyboard Shortcuts**.
- Modify the “Switch Input Source” shortcut to your preferred key combination.
6.3. Setting Different Layouts for External and Internal Keyboards
To assign different layouts for built-in and external keyboards, use the **X11 settings**.
Steps:
- Check the current device information using:
xinput list
- Apply different layouts to specific devices:
setxkbmap -device <Device ID> us
7. Conclusion
Setting up a Japanese keyboard in Ubuntu is essential for a smooth typing experience. This guide has provided clear steps, troubleshooting tips, and advanced settings for an optimized Japanese input environment.
By following this tutorial, you can customize Ubuntu to match your needs and enhance productivity. If you found this guide useful, feel free to share it with other Linux users.
Enjoy your Ubuntu experience!