How to switch your Linux keyboard layout to US (United States)
Here’s how to switch your Linux keyboard layout to US (United States), either temporarily or permanently.
🧩 Option 1 – Temporary switch (immediate effect)
Run this in a terminal:
setxkbmap us
That changes the layout instantly (no reboot needed).
Test it:
Shift + 3
→ should give#
- Key left of Enter → gives
'
and"
- Key left of Z → gives
<
and>
This lasts until logout or reboot.
⚙️ Option 2 – Make it permanent
🖥️ If using GNOME, KDE, XFCE, etc.
- Open Settings → Keyboard → Layout (sometimes under “Region & Language”).
- Add English (US).
- Remove or move down any other layouts (e.g. “English (UK)”).
🧱 If on a terminal-only or server system
Edit the system keyboard configuration file:
sudo nano /etc/default/keyboard
Find the line:
XKBLAYOUT="gb"
and change it to:
XKBLAYOUT="us"
Save (Ctrl + O → Enter → Ctrl + X), then apply:
sudo dpkg-reconfigure keyboard-configuration
sudo udevadm trigger --subsystem-match=input --action=change
🧪 Verify current layout
setxkbmap -query
Expected output:
layout: us