- 1 1. Introduction
- 2 2. How to Choose a Japanese Keyboard
- 3 3. Steps to Configure a Japanese Keyboard on Ubuntu
- 4 4. Troubleshooting
- 5 5. Frequently Asked Questions (FAQ)
- 5.1 Q1: Can I switch between English and Japanese using the Caps Lock key?
- 5.2 Q2: Keyboard settings revert after reboot. Why?
- 5.3 Q3: Japanese input stopped working after Ubuntu update. What should I do?
- 5.4 Q4: Why can’t I type Japanese in certain apps?
- 5.5 Q5: What is the most efficient way to switch languages?
- 6 6. Advanced Usage: Managing Multiple Keyboards and Languages
- 7 7. Conclusion
1. Introduction
Have you ever felt the need to configure a Japanese keyboard while using Ubuntu? To comfortably use Japanese in Ubuntu’s versatile Linux environment, proper keyboard settings are essential. This article provides a beginner-friendly explanation of how to set up a Japanese keyboard on Ubuntu and how to troubleshoot common issues.
We will also cover the differences between JIS and US keyboards and explain the advantages of each, helping you choose the best option for your needs. By the end of this article, you will be able to type Japanese smoothly on Ubuntu.
2. How to Choose a Japanese Keyboard
To type Japanese comfortably on Ubuntu, it’s important to understand the different keyboard types. There are two main layouts—JIS and US—and knowing their characteristics will help you choose the one that best suits your workflow.
Differences Between JIS and US Keyboards
The JIS keyboard layout is primarily used in Japan and is optimized for Japanese input. On the other hand, the US keyboard layout is commonly used in English-speaking regions. Below is a comparison of their main characteristics.
| Feature | JIS Keyboard | US Keyboard |
|---|---|---|
| Enter key shape | Large and vertical | Wide and horizontal |
| Layout differences | Dedicated Kana and Eisu keys | Caps Lock can be reassigned for switching |
| Setup requirements | May require manual configuration in Ubuntu | Often works with default settings |
Which Should You Choose?
- If you frequently use Japanese
The JIS keyboard is convenient since it includes dedicated keys for switching input modes, making Japanese typing smoother. - If you program or type English often
The US keyboard layout is recommended. It follows a global standard, making it easier to use across different environments.
3. Steps to Configure a Japanese Keyboard on Ubuntu
To use a Japanese keyboard on Ubuntu, follow the correct configuration steps. The process below explains each step clearly for beginners.
3.1. Install the Japanese Input Environment
First, install the tools required for Japanese input. Ubuntu commonly uses a Japanese input system called “ibus-mozc.”
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 with the following command:
ibus restartThis completes the installation of the Japanese input environment.
3.2. Configure the Keyboard Layout
Next, set your keyboard layout to Japanese. This step is especially important for JIS keyboards.
Steps:
- Open the Settings application
Launch the Ubuntu “Settings” app. - Select “Region & Language”
Choose “Region & Language” from the left menu. - Add an Input Source
- Click “Add Input Source” and select “Japanese (Mozc).”
- If you use a JIS keyboard, select “Japanese (JIS).”
- Adjust Priority
Drag the Japanese input source to the top of the list.
3.3. Set Shortcut Keys
To switch between English and Japanese efficiently, configure input switching shortcuts.
Steps:
- Open Keyboard Settings
In the Settings app, select the “Keyboard” section. - Configure switching shortcuts
By default, switching is done usingSuper + SpaceorAlt + Shift, but you can modify this as needed. - Use Caps Lock as a switch key
Run the following command to assign Caps Lock as a toggle:
gsettings set org.freedesktop.ibus.general.hotkey triggers "['Caps_Lock']"The shortcut key is now enabled.
4. Troubleshooting
If the Japanese keyboard does not work correctly, this section explains common issues and solutions.
4.1. Cannot Type Japanese
If input remains in English even after setting up the keyboard:
Causes and Solutions:
- Incorrect input source
- Check that your input source is set to “Japanese (Mozc)” in “Region & Language.”
- Re-add the input source if needed.
- IBus is not running
- Restart IBus:
ibus restart - If issues persist, log out and log back in.
- Mozc not installed correctly
- Reinstall it:
sudo apt purge ibus-mozc sudo apt install ibus-mozc
4.2. Keyboard Layout Not Recognized
When a JIS keyboard is recognized as US layout:
Solution:
- Check layout settings
- Confirm that “Japanese (JIS)” is selected in “Region & Language.”
- Set layout via command
- Use this command:
setxkbmap jp
- Make settings persistent
- Edit the configuration file:
sudo nano /etc/default/keyboard
SetXKBLAYOUTto:XKBLAYOUT="jp"
4.3. Shortcut Keys Don’t Work
If shortcut keys do not respond:
Solution:
- Verify settings
- Check key bindings in “Keyboard Shortcuts.”
- Use Caps Lock as a shortcut
- Run:
gsettings set org.freedesktop.ibus.general.hotkey triggers "['Caps_Lock']"
4.4. Cannot Type Japanese in Specific Apps
Some applications may not support IBus correctly.
Solution:
- Restart the application
- Close and reopen the app.
- Restart IBus
ibus restart
- Check compatibility
- Older apps may not support IBus. Try using fcitx instead.
5. Frequently Asked Questions (FAQ)
This section answers common questions about configuring and using a Japanese keyboard on Ubuntu.
Q1: Can I switch between English and Japanese using the Caps Lock key?
A:
Yes. Run the following command:
gsettings set org.freedesktop.ibus.general.hotkey triggers "['Caps_Lock']"- You can now switch using the Caps Lock key.
Q2: Keyboard settings revert after reboot. Why?
A:
This occurs because settings were not saved permanently. Edit the configuration file:
sudo nano /etc/default/keyboard- Set
XKBLAYOUTto your preferred layout:
XKBLAYOUT="jp"- Save, exit, and restart.

Q3: Japanese input stopped working after Ubuntu update. What should I do?
A:
Reinstall and restart Mozc and IBus:
sudo apt update
sudo apt install --reinstall ibus-mozc ibus restartQ4: Why can’t I type Japanese in certain apps?
A:
Some apps do not support IBus. Restart the app, or use another input method like fcitx.
Q5: What is the most efficient way to switch languages?
A:
Use shortcut keys:
- Super + Space (default)
- Caps Lock (after configuration)
6. Advanced Usage: Managing Multiple Keyboards and Languages
Ubuntu allows seamless switching between multiple input languages. This section explains efficient configuration methods.
6.1. Adding Multiple Keyboard Layouts
To switch between Japanese and US layouts:
- Open Settings
- Select Region & Language
- Add Input Source
- Choose English (US) to add it.
- Adjust Priority
6.2. Shortcut Keys for Switching Input Sources
Super + Spaceswitches input sources in order.
6.3. Building a Multilingual Environment
Add Chinese, Korean, or other languages via “Region & Language.”
6.4. Applying Settings Per Keyboard Device
xinput list
setxkbmap -device <deviceID> us6.5. Using Caps Lock as an Advanced Switch
gsettings set org.freedesktop.ibus.general.hotkey triggers "['Caps_Lock']"7. Conclusion
Setting up a Japanese keyboard on Ubuntu is fundamental for smooth Japanese input. This article explained essential steps, troubleshooting methods, and advanced configurations for multilingual users.
7.1. Recap
- Understanding keyboard types: Differences between JIS and US layouts
- Essential setup: Installing ibus-mozc and configuring layouts
- Troubleshooting tips: Fixing layout, input, and shortcut issues
- Advanced usage: Switching layouts and language management
7.2. Importance of Proper Keyboard Configuration
A properly configured keyboard greatly improves productivity, especially when programming, writing, or working in multilingual environments.
7.3. Next Steps
- Customize Ubuntu UI themes
- Learn Linux command-line basics
- Explore multilingual input environments
7.4. Final Message
Japanese keyboard configuration on Ubuntu may seem challenging at first, but once completed, it transforms your workflow. If this article helped you, please share it with other Linux users. Stay tuned for more tips and tools to enhance your Ubuntu experience!


