Linux: Using Foreign Letters in the Terminal

I had some problems switching to my native language (Norwegian) when setting up Debian 8. Here’s what worked for me.

Note: This tutorial will most likely also work on Ubuntu since it's based on Debian.

This can also be used to change the language from some foreign language and to English.

Most of the following commands need sudo to work, so you might as well su first.

Do the following:

$ dpkg-reconfigure keyboard-configuration

Then choose your language. UTF-8 is recommended.

Then do:

$ service keyboard-setup restart

You may also have to reboot after this or other changes. In that case, do:

$ sudo reboot

Other things you can try:


$ dpkg-reconfigure console-data

You may need to install the package first, however. In that case do:

$ apt-get update

$ apt-get install console-data


$ setxkbmap -layout [ISO language code]

…where ISO can be no for Norwegian, se for Swedish, etc.

This may not make a persistent change, though.


According to the manual, you can try this:

$ dpkg-reconfigure keyboard-configuration

$ service keyboard-setup restart



The two most relevant English language codes in Debian:

For Norwegian I recommend nb_NO.utf8.

Things to know: