The setxkbmap tr
command is used on Linux-based systems to set the keyboard layout to Turkish (Q or F). Especially on remote servers accessed via SSH, systems with a desktop environment, or Live Linux sessions, if the keyboard layout defaults to English, this command can instantly change it to Turkish.
Basic Usage:
setxkbmap tr
This command activates the Turkish Q keyboard layout by default.
For Turkish F Keyboard:
setxkbmap tr f
Verifying Keyboard Layout:
setxkbmap -query
The output usually looks like this:
rules: evdev
model: pc105
layout: tr
variant:
Making it Permanent in Xorg Sessions:
If you are using a desktop environment, you can make it permanent by adding the following line to the ~/.xprofile
or ~/.bashrc
file:
setxkbmap tr
Things to Consider with SSH Connections
In SSH sessions, the keyboard layout is taken from the client (your own computer). That is:
-
Even if
setxkbmap tr
is run on the remote system, it will only be effective if there is a graphical desktop. -
If you are working through the console (TTY), a different method is required (e.g.,
loadkeys tr
).
For Console (TTY or SSH console access):
loadkeys tr
This command enables Turkish character support via the terminal or SSH.
Summary:
-
setxkbmap tr
: For Turkish Q keyboard layout -
setxkbmap tr f
: For Turkish F keyboard layout -
loadkeys tr
: For Turkish character support in console sessions
Setting the keyboard layout appropriately is critical to be able to enter the correct characters while working on Linux.