Romanized Nepali has become de-facto standard for typing Nepali. This is going to be a short guide on how to enable romanized nepali on Linux. Keep in mind that there is nothing to download as linux comes with the keyboard layout by default. However some of the linux distribution like Ubuntu make this process even simpler by giving a GUI interface. So This post will link external posts for those distribution and will only contain barebones method to change layout, which will work for any desktop environment running on X11 Server. So this tutorial will not work for wayland.
if you are just looking for answer and in hurry. go to your terminal and paste
setxkbmap -model pc104 -layout us,np -option grp:alt_shift_toggle
Now press alt+shift
. To make it persistent. Go to your .profile
which is usually on ~/.profile
and paste the command.
Gnome
Distribution covered: Ubuntu, Fedora, OpenSUSE, Manjaro GNOME Edition etc
Chnage keyboard layout in GNOME
XFCE
Distribution covered: Linux Mint XFCE, Endeavour OS etc
change keyboard layout in XFCE
KDE
Distribution covered: KDE Neon, OpenSUSE KDE, Fedora KDE, Manjaro KDE etc
Using setxkbmap
setxkbmap
sets the keyboard to use layout determined by various options on the command line. If one wants to map their keyboard CAPS_LOCK
to ESC
this is the command to go, or if one wants to change the variant of the keyboard from QWERTY to DVORAK, this is the command to look for. If you want to know more type man setxkbmap
on your terminal or click the link.
Here is the list of all the possible configuration option for
setxkbmap
.
setxkbmap -model pc104 -layout np,us -option grp:alt_shift_toggle
-
-model
: pc104 is a generic keyboard with 104 characters, find your model on the list of possible configuration option. -
-layout
: hereus,np
means we are using US layout and Nepali layout. Again for your Country layout code you can look on the link above. -
-option
:grp
means switching to another layout andalt_shift_toggle
is one of the combination to toggle between nepali and english.