How to change the system language on Linux

FameSystems
FameSystems · HelpDesk Team
Bijgewerkt op January 2, 2024

Introduction

Changing the system language in Linux might seem complicated at first glance, but with a few simple steps, anyone can master this task.

This guide will lead you through the process, from checking the current language settings to restarting your system with the new language setting.

Checking Environment Variables

Linux uses a set of environment variables to control language and localization settings.

These variables include LANG, LANGUAGE, LC_CTYPE, LC_MESSAGES, and LC_ALL.

Each of these variables has a specific function, but for general language settings, LANG or LC_ALL are most important.

Checking Procedure

To check which language settings are currently active, you can enter the following command into the terminal:

env | grep LANG

As a result, you will get an output similar to this:

LANG=en_US.UTF-8

This indicates that the LANG environment variable is set to English (USA) with UTF-8 encoding.

If no such response appears, it is necessary to define a corresponding variable.

Changing the Language

Important: Before you proceed, make sure you have root permissions, as you won't be able to make the changes otherwise.

Language Setting

For example, to choose English (USA) as the language, execute this command:

sudo export LANG=en_US.UTF-8

For German:

sudo export LANG=de_DE.UTF-8

Reconfiguring Local Settings

After you have changed the language, it is important to reconfigure the locales. This is done with the following command:

sudo dpkg-reconfigure locales

Then, a graphical user interface will open, where you can select the desired language and confirm it with the space bar.


After setting the language and the locales, it is necessary to restart the server to apply the changes.

After restarting, your system will display in the new language.


Van FameSystems | January 2, 2024 | Tags:

Heb je een oplossing gevonden? Perfect!

Als u op zoek bent naar meer: Wij bieden krachtige rootservers, gameservers, webhosting, TeamSpeak-servers en reselleropties.

Meer informatie over onze producten