Configure time service clients

7. Deploy, Configure, and Maintain Systems

πŸ“˜Red Hat Certified System Administrator (RHCSA – EX200)


Time synchronization in Linux is very important in IT environments. Computers and servers need to agree on the same time to avoid issues with logs, backups, authentication, and scheduled tasks. On Linux systems like Red Hat, we use a time service called NTP (Network Time Protocol) or chrony, depending on the system version.

In Red Hat 8 (and similar RHEL versions), the default time service is chronyd. Older systems used ntpd. For the RHCSA exam, you should focus on chrony, but knowing the basics of ntpd helps as well.


1. Check the Current Time on the System

Before configuring time services, you should know the current time.

  • Command:
timedatectl
  • What it shows:
    • Local time
    • Universal Coordinated Time (UTC)
    • Time zone
    • Whether NTP (time synchronization) is enabled
    • RTC (hardware clock) status

Example output:

Local time: Fri 2026-03-17 15:30:00 UTC
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active

2. Check if Chrony is Installed and Running

Red Hat uses chronyd for time synchronization.

  • Check status:
systemctl status chronyd
  • Install chrony (if missing):
sudo yum install chrony -y
  • Start and enable service:
sudo systemctl start chronyd
sudo systemctl enable chronyd
  • Verify synchronization:
chronyc tracking

This will show the current status, including how closely your system clock matches the NTP server.


3. Configure a Time Service Client

A time client connects to a time server (like time.example.com) to keep its clock correct.

  • Configuration file:
/etc/chrony.conf
  • Steps to configure a client:
    1. Open /etc/chrony.conf in an editor: sudo vi /etc/chrony.conf
    2. Add or modify the server line(s): server iburst Example: server 0.rhel.pool.ntp.org iburst
      server 1.rhel.pool.ntp.org iburst
      • iburst helps the client synchronize faster when it starts.
    3. Save and exit the file.
  • Restart chronyd after changes:
sudo systemctl restart chronyd

4. Verify Time Synchronization

  • Check chrony sources (servers it’s using):
chronyc sources -v
  • Check current tracking status:
chronyc tracking
  • Check general system time:
timedatectl

5. Set the Time Zone (Important for RHCSA)

Sometimes the clock is correct, but the time zone is wrong. To fix:

  • List available time zones:
timedatectl list-timezones
  • Set the time zone:
sudo timedatectl set-timezone Asia/Dhaka
  • Verify:
timedatectl

6. Enable NTP Synchronization

Ensure your system automatically synchronizes with the time server.

sudo timedatectl set-ntp true

Check status:

timedatectl

You should see NTP service: active and System clock synchronized: yes.


7. Practical Exam Tips for RHCSA

  • You may be asked to:
    1. Configure a client to sync with a given NTP server.
    2. Enable the chronyd service so it starts on boot.
    3. Ensure the system time is correct and synchronized.
    4. Set or change the time zone.
  • Focus on these commands:
    • timedatectl – check and set time & NTP
    • systemctl start|enable|status chronyd – manage service
    • chronyc tracking – verify synchronization
    • Editing /etc/chrony.conf – configure NTP servers
  • Remember: Do not manually change the system time unless necessary, always rely on NTP/chrony for long-term accuracy.

Summary

  • Time synchronization ensures consistency across servers and systems.
  • Use chronyd to connect clients to NTP servers.
  • Configure /etc/chrony.conf with the correct NTP servers.
  • Always check the time zone and NTP status.
  • Enable the service to start at boot for automatic updates.

By following these steps, you can pass the RHCSA exam question about configuring time service clients.

Buy Me a Coffee