Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 4. 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:

  • Date and time
  • System locales
  • Keyboard layout
  • Language

4.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.

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

Procedure

  1. Optional: List the timezones:

    # timedatectl list-timezones
    
      Europe/Berlin
    Copy to Clipboard Toggle word wrap
  2. Set the time zone:

    # timedatectl set-timezone <time_zone>
    Copy to Clipboard Toggle word wrap
  3. Set the date and time:

    # timedatectl set-time <YYYY-mm-dd HH:MM:SS>
    Copy to Clipboard Toggle word wrap

Verification

  1. Display the date, time, and timezone:

    # date
    Mon Mar 30 16:02:59 CEST 2020
    Copy to Clipboard Toggle word wrap
  2. To see more details, use the timedatectl command:

    # 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
    Copy to Clipboard Toggle word wrap

4.2. Configuring time settings by using the web console

You can set a time zone and synchronize the system time with a Network Time Protocol (NTP) server in the RHEL web console.

Prerequisites

  • You have installed the RHEL 8 web console.
  • You have enabled the cockpit service.
  • Your user account is allowed to log in to the web console.

    For instructions, see Installing and enabling the web console.

Procedure

  1. Log in to the RHEL 8 web console.

    For details, see Logging in to the web console.

  2. Click the current system time in Overview.
  3. Click System time.
  4. In the Change System Time dialog box, change the time zone if necessary.
  5. In the Set Time drop-down menu, select one of the following:

    Manually
    Use this option if you need to set the time manually, without an NTP server.
    Automatically using NTP server
    This is a default option, which synchronizes time automatically with the preset NTP servers.
    Automatically using specific NTP servers
    Use this option only if you need to synchronize the system with a specific NTP server. Specify the DNS name or the IP address of the server.
  6. Click Change.

Verification

  • Check the system time displayed in the System tab.

4.3. Configuring the system locale

System-wide locale settings are stored in the /etc/locale.conf file that 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.

Procedure

  1. Optional: Display the current system locales settings:

    # localectl status
    System Locale: LANG=en_US.UTF-8
    	VC Keymap: de-nodeadkeys
       X11 Layout: de
      X11 Variant: nodeadkeys
    Copy to Clipboard Toggle word wrap
  2. List available system locale settings:

    $ localectl list-locales
    C.UTF-8
    ...
    en_US.UTF-8
    en_ZA.UTF-8
    en_ZW.UTF-8
    ...
    Copy to Clipboard Toggle word wrap
  3. Update the syste locale setting:

For example:

+

# localectl set-locale LANG=en_US.UTF-8
Copy to Clipboard Toggle word wrap
Note

The GNOME Terminal does not support non-UTF8 system locales. For more information, see the Red Hat Knowledgebase solution The gnome-terminal application fails to start when the system locale is set to non-UTF8.

4.4. Configuring the keyboard layout

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

Procedure

  1. To list available keymaps:

    $ localectl list-keymaps
    ANSI-dvorak
    al
    al-plisi
    amiga-de
    amiga-us
    ...
    Copy to Clipboard Toggle word wrap
  2. To display the current status of keymaps settings:

    $ localectl status
    ...
    VC Keymap: us
    ...
    Copy to Clipboard Toggle word wrap
  3. To set or change the default system keymap. For example:

    # localectl set-keymap us
    Copy to Clipboard Toggle word wrap

4.5. Changing the font size in text console mode

You can change the font size in the virtual console.

Procedure

  1. Display the currently-used font file:

    # cat /etc/vconsole.conf
    
    FONT="eurlatgr"
    Copy to Clipboard Toggle word wrap
  2. List the available font files:

    # ls -1 /usr/lib/kbd/consolefonts/*.psfu.gz
    
    /usr/lib/kbd/consolefonts/eurlatgr.psfu.gz
    /usr/lib/kbd/consolefonts/LatArCyrHeb-08.psfu.gz
    /usr/lib/kbd/consolefonts/LatArCyrHeb-14.psfu.gz
    /usr/lib/kbd/consolefonts/LatArCyrHeb-16.psfu.gz
    /usr/lib/kbd/consolefonts/LatArCyrHeb-16+.psfu.gz
    /usr/lib/kbd/consolefonts/LatArCyrHeb-19.psfu.gz
    Copy to Clipboard Toggle word wrap

    Select a font file that supports your character set and code page.

  3. Optional: To test a font file, load it temporarily:

    # setfont LatArCyrHeb-16.psfu.gz
    Copy to Clipboard Toggle word wrap

    The setfont utility applies the font file immediately and terminals use the new and font size until you reboot or apply a different font file.

  4. To return to the font file defined in /etc/vconsole.conf, enter setfont without any parameters.
  5. Edit the /etc/vconsole.conf file and set the FONT variable to the font file RHEL should load at boot time, for example:

    FONT=LatArCyrHeb-16
    Copy to Clipboard Toggle word wrap
  6. Reboot the host

    # reboot
    Copy to Clipboard Toggle word wrap
Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat