Locale linux red hat

Chapter 1. Changing basic environment settings

Configuration of basic environment settings is a part of the installation process. The following sections guide you when you change them later. The basic configuration of the environment includes:

1.1. Configuring the date and time

Accurate timekeeping is important for several reasons. In Red Hat Enterprise Linux, timekeeping is ensured by the NTP protocol, which is implemented by a daemon running in user space. The user-space daemon updates the system clock running in the kernel. The system clock can keep time by using various clock sources.

Red Hat Enterprise Linux 8 uses the chronyd daemon to implement NTP . chronyd is available from the chrony package. For more information, see Using the chrony suite to configure NTP.

1.1.1. Displaying the current date and time

To display the current date and time, use either of these steps.

$ date Mon Mar 30 16:02:59 CEST 2020
$ timedatectl Local time: Mon 2020-03-30 16:04:42 CEST Universal time: Mon 2020-03-30 14:04:42 UTC RTC time: Mon 2020-03-30 14:04:41 Time zone: Europe/Prague (CEST, +0200) System clock synchronized: yes NTP service: active RTC in local TZ: no

Additional resources

1.2. Configuring the system locale

System-wide locale settings are stored in the /etc/locale.conf file, which is read at early boot by the systemd daemon. Every service or user inherits the locale settings configured in /etc/locale.conf , unless individual programs or individual users override them.

Читайте также:  Линукс минт настройка видеокарты

This section describes how to manage system locale.

    To list available system locale settings:

$ localectl list-locales C.utf8 aa_DJ aa_DJ.iso88591 aa_DJ.utf8 .
# localectl set-locale LANG=en_US

Additional resources

1.3. Configuring the keyboard layout

The keyboard layout settings control the layout used on the text console and graphical user interfaces.

    To list available keymaps:

$ localectl list-keymaps ANSI-dvorak al al-plisi amiga-de amiga-us .
$ localectl status . VC Keymap: us .

Additional resources

1.4. Changing the language using desktop GUI

This section describes how to change the system language using the desktop GUI.

Prerequisites

  1. Open the Settings application from the system menu by clicking on its icon. System menu
  2. In Settings , choose Region & Language from the left vertical bar.
  3. Click the Language menu. cs language menu
  4. Select the required region and language from the menu. cs select region languageIf your region and language are not listed, scroll down, and click More to select from available regions and languages. cs available region language
  5. Click Done .
  6. Click Restart for changes to take effect. cs restart region language

Some applications do not support certain languages. The text of an application that cannot be translated into the selected language remains in US English.

Additional resources

Источник

Changing System Locale Settings in Red Hat 8

Changing System Locale Settings in Red Hat 8

Setting the correct system locale is important for many reasons. The locale setting controls how a lot of the information on the system is presented. It usually specifies the keyboard layout, input language and is used by many programs on the system. The system locale will also serve as the default user locale as well. In this quick tip we will cover how to list the available system locale settings, show the currently set locale and change the system locale settings using the localectl command. We will also show you how to set your user specific settings via the Gnome GUI.

Show the Current Locale Settings

You can show your current locale settings by simply running the localectl command with no options. Alternatively, you can specify status as an argument to achieve the same results.

[[email protected] ~]$ localectl System Locale: LANG=US VC Keymap: us X11 Layout: us X11 Model: pc105+inet X11 Options: terminate:ctrl_alt_bksp [[email protected] ~]$ localectl status System Locale: LANG=US VC Keymap: us X11 Layout: us X11 Model: pc105+inet X11 Options: terminate:ctrl_alt_bksp

List Available System Locale Settings

Before you change the locale settings, you should list the available settings to ensure your are using the correct syntax. You can list the available settings by using the list-locales option to the localectl command.

[[email protected] ~]$ localectl list-locales C.utf8 aa_DJ aa_DJ.iso88591 aa_DJ.utf8 aa_ER aa_ER.utf8 [email protected] [email protected] aa_ET aa_ET.utf8 af_ZA af_ZA.iso88591 . OUTPUT TRUNCATED.

HINT: The list will be paginated, you can display the whole list without the pager using the —no-pager option.

Читайте также:  Serial port reading linux

List Available Key Maps

You can list the available key maps similarly by using the list-keymaps option.

[[email protected] ~]$ localectl list-keymaps ANSI-dvorak al al-plisi amiga-de amiga-us applkey at at-mac at-nodeadkeys . OUTPUT TRUNCATED.

Changing the Locale Settings

Once you have listed and selected the appropriate locale you can set it using the set-locale option.

Example, setting local to US English:

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

Changing the Key Map

You can change to one of the available key maps by using the set-keymap options followed by the desired map.

Example, setting the keymap to US:

sudo localectl set-keymap us

NOTE: Changing the keymap will also change the X11 Layout and Models automatically. If this is not the desired effect, you can set the X11 settings separately.

Change User Specific Settings in GUI

You can change some of the settings for your currently logged in user by using the Gnome settings panel. Open the settings by clicking the drop down on the top right of the window and selecting the settings icon.

Opening the Gnome settings on Red Hat 8 Linux

Once the settings are open, click Region & Language and select your desired options.

Region and Language Settings in the Gnome Settings Panel

Conclusion

Changing the locale settings is simple once you know how to do it. Here we covered how to set the system wide settings, which are also used for the default user settings. We also discussed changing the user specific settings in the Gnome settings panel.

Resources

Источник

How to Add Locale on CentOS/RHEL 8

Question: How to add support for additional locales?

Locales on Linux are used to set the system’s language as well as other language-specific properties. This can include texts from error messages, log output, user interfaces, and if you are using a window manager such as Gnome, even Graphical User Interfaces (GUI). Locale settings can also define region-specific formatting such as paper sizes, numbers, and their natural sorting, currency information, and so on. They also define character encoding, which can be important if you choose a language that has characters that cannot be found in the standard ASCII encoding.

Читайте также:  Выход через прокси linux

1. As a root user, execute the below command:

From this full list of available locales, we will use the locale required by us.

2. In this example, we will use Spanish Locale for es_MX.UTF-8.

# dnf install glibc-langpack-es

3. Check the locale installed is available:

# localectl set-locale LANG=es_MX.UTF-8

5. Then confirm the status:

System Locale: LANG=es_MX.UTF-8 VC Keymap: us X11 Layout: us

Summary

Sometimes, single system users need different language settings than the system’s locale (which can only be set by the root user), according to their regional keyboard differences and for interacting with the system in their preferred human language. System-wide locales get inherited by every user as long as they are not overwritten by local environment variables.

Changing system-wide locales does not necessarily have an effect on your user’s locales if they have already defined something else for themselves.

Источник

Оцените статью
Adblock
detector