How to change Kali Linux language without reinstalling the system

Locale

When installing Linux, you can select the system language (locale) - and in the future this language will be used in Linux programs and windows (except for those applications for which no translation has been made).

If you decide to change the Linux language, then you do not need to reinstall it - just follow the simple steps.

To find out the current language settings, type the command:

locale

Output example:

To view the available language settings (locales), use the command

locale -a

To change the system language, it is necessary that the locale to which you want to change the language is already present in the system. If it is not there, then you need to add it.

To add a new locale, open the /etc/locale.gen file:

sudo gedit /etc/locale.gen

And uncomment the lines with the desired new locales there. Then run the command:

sudo locale-gen

Now you can see the new language settings (new locale) in the list of available locales.

locale -a

Changing the locale for the current session

To change the language for the current session, you need to set the LANG environment variable, this can be done with the export command:

# Set English locale
export LANG=en_US.UTF-8

# Set the Russian locale
export LANG=ru_RU.UTF-8

# Set the French locale
export LANG=fr_FR.UTF-8

Change language settings permanently for one user

Add a line with the export of the desired locale (for example, “export LANG=en_US.utf-8”) to the ~/.bashrc file

The changes will take effect after logging out/logging in and will take effect after every reboot.

Changing the default system locale

Run the following command (specify the locale you need):

sudo localectl set-locale LANG=en_US.UTF-8

Or:

sudo localectl set-locale LANG=ru_RU.UTF-8

Finally, you can see a message like this:

It offers to change the name of the automatically created folders in the user's directory. That is, to change to translate their name into a new system language.

To prevent this window from appearing every time the system boots, check the “Don’t ask this again” box.

To reopen this window, run at a command prompt:

echo 'en_US' > ~/.config/user-dirs.locale
xdg-user-dirs-gtk-update

Recommended for you:

Leave a Reply

Your email address will not be published. Required fields are marked *