Search

Chapter 4. Changing basic environment settings

download PDF

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.

4.1.1. Displaying the current date and time

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

Procedure

  1. Enter the date command:

    $ date
    Mon Mar 30 16:02:59 CEST 2020
  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

Additional resources

  • date(1) and timedatectl(1) man pages on your system

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

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.

    RHEL web console

  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.

    RHEL web console

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

  • To list available system locale settings:

    $ localectl list-locales
    C.utf8
    aa_DJ
    aa_DJ.iso88591
    aa_DJ.utf8
    ...
  • To display the current status of the system locales settings:

    $ localectl status
  • To set or change the default system locale settings, use a localectl set-locale sub-command as the root user. For example:

    # localectl set-locale LANG=en_US
Note

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

Additional resources

  • man localectl(1), man locale(7), and man locale.conf(5)

4.4. Configuring the keyboard layout

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

Procedure

  • To list available keymaps:

    $ localectl list-keymaps
    ANSI-dvorak
    al
    al-plisi
    amiga-de
    amiga-us
    ...
  • To display the current status of keymaps settings:

    $ localectl status
    ...
    VC Keymap: us
    ...
  • To set or change the default system keymap. For example:

    # localectl set-keymap us

Additional resources

  • man localectl(1), man locale(7), and man locale.conf(5)

4.5. Changing the font size in text console mode

You can change the font size in the virtual console by using the setfont command.

  • Enter the setfont command with the name of the font, for example:

    # setfont /usr/lib/kbd/consolefonts/LatArCyrHeb-19.psfu.gz
Note

The setfont command searches for multiple hard-coded paths by default. Therefore, setfont does not require the full name and path to the font.

  • To double the size of the font horizontally and vertically, enter the setfont command with -d parameter:

    # setfont -d LatArCyrHeb-16
Note

The maximum font size that you can double is 16x16 pixel.

  • To preserve the selected font during the reboot of the system, use the FONT variable in the /etc/vconsole.conf file, for example:

    # cat /etc/vconsole.conf
    KEYMAP="us"
    FONT="eurlatgr"
  • You can find various fonts in the kbd-misc package, which is installed with the`kbd` package. For example, the font LatArCyrHeb has many variants:

    # rpm -ql kbd-misc | grep LatAr
    
    /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
Note

The maximum supported font size by the virtual console is 32 pixels. You can reduce the font readability problem by using smaller resolution for the console.

4.6. Additional resources

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.