-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux Locale and Language
Complete beginner-friendly guide to configuring locales and languages on Linux, covering Arch Linux, CachyOS, and other distributions including language settings, input methods, and keyboard layouts.
- Understanding Locales
- Setting Locale
- Language Configuration
- Input Methods
- Keyboard Layouts
- Troubleshooting
Locale defines language and regional settings.
What it includes:
- Language: System language
- Region: Regional formats
- Character encoding: Text encoding
- Date/time format: Date and time display
- Number format: Number formatting
- Currency: Currency format
Why configure:
- Language: Use system in your language
- Formats: Regional date/number formats
- Comfort: Better user experience
- Compatibility: Proper text encoding
List locales:
# List available locales
locale -aEdit locale.gen:
# Edit locale file
sudo vim /etc/locale.genUncomment desired locale:
#en_US.UTF-8 UTF-8
Change to:
en_US.UTF-8 UTF-8
Generate locales:
# Generate locale
sudo locale-genSet system locale:
# Set locale
echo "LANG=en_US.UTF-8" | sudo tee /etc/locale.conf
# Set for user
echo "LANG=en_US.UTF-8" >> ~/.bashrcOr use localectl:
# Set locale
sudo localectl set-locale LANG=en_US.UTF-8GNOME:
# Set language
gsettings set org.gnome.system.locale region 'en_US.UTF-8'
# Or use GUI
# Settings > Region & LanguageKDE:
- System Settings → Regional Settings
- Select language
XFCE:
- Settings → Appearance → Fonts
- Configure language
Install IME:
# Arch/CachyOS
sudo pacman -S ibus ibus-gtk ibus-gtk3 ibus-qt
# For Chinese
sudo pacman -S ibus-libpinyin
# For Japanese
sudo pacman -S ibus-anthy ibus-mozcDebian/Ubuntu:
sudo apt install ibus ibus-gtk ibus-gtk3Fedora:
sudo dnf install ibus ibus-gtk ibus-gtk3Start IBus:
# Start IBus
ibus-daemon -drx
# Configure
ibus-setupUsing localectl:
# List layouts
localectl list-keymaps
# Set layout
sudo localectl set-keymap us
# Set X11 layout
sudo localectl set-x11-keymap usGNOME:
- Settings → Keyboard
- Add layout
- Switch with: Super + Space
KDE:
- System Settings → Input Devices → Keyboard
- Add layout
- Switch with: Alt + Shift
XFCE:
- Settings → Keyboard → Layout
- Add layout
Check locale:
# Check current locale
locale
# Check locale.conf
cat /etc/locale.confRestart IBus:
# Kill IBus
killall ibus-daemon
# Restart
ibus-daemon -drxThis guide covered locale and language configuration for Arch Linux, CachyOS, and other distributions, including locale setup, language settings, input methods, and keyboard layouts.
- Time Synchronization - Time setup
- Desktop Environments - Desktop setup
- ArchWiki Locale: https://wiki.archlinux.org/title/Locale
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.