Configure Linux Time Sources
Learn On Demand
Learn On Demand Pro Series

Time
1 hour
Difficulty
Intermediate

This Configure Linux Time Sources IT Pro Challenge helps learners understand how to set up time synchronization, configure network time protocol, and set the time zone on a Linux server. In the process, you will gain a good working knowledge of timedateacl commands.

Start your free 7-day trial and become one of the 3 million Cybersecurity and IT professionals advancing their career goals

Sign up with
Or

Already have an account? Sign In »

Overview

In this Configure Linux Time Sources IT Pro Challenge, learners will become familiar with the timedatecl command as part of learning how to set the time synchronization status and set the date and time. Learners will also understand how to configure network time protocol and set the time zone on a Linux server. They will also learn about and install the network time protocol (NTP).

The skills acquired in this lab are valuable for careers in Linux or Network administration.

Overview

The scenario for this hands-on lab is that you're the Linux administrator for your company, and you've been tasked with configuring the timezone and date/time values on an Ubuntu Linux server and ensuring that network time synchronization is operational.

By taking this lab, you will become familiar with the sudo and timedateacl commands. You will use timedateacl to query the system clock, set the timezone, date, and time, and enable/disable time synchronization. In the process, you will learn about the Network Time Protocol (NTP) and will use the sudo command, which allows you to execute a command as another user.

Set the timezone and date and time on Ubuntu1

First, you will use the timedateacl command to set the timezone, date, and time on the Linux server.

The timedateacl command allows you to query and change the system clock and its settings and to enable/disable time synchronization with a remote NTP server.

Network Time Protocol (NTP) is a protocol that is used to synchronize the clocks between systems within a few milliseconds of Coordinated Universal Time (UTC).

Test time synchronization

In order to test the time synchronization, you first need to view the current time synchronization status by using the timedatecl command. If time synchronization is not enabled, you will use the sudo timedatectl set-ntp true command to enable NTP.

To test the time synchronization status is active, you will attempt to set the date and time to incorrect values. If the time synchronization status is active, your attempt should fail, and NTP time synchronization will return the date/time to the correct values.

Configure custom time sources

In this part of the virtual lab, you will configure timesyncd to use a pool of NTP servers.

The NTP pool is a virtual collection of time servers that provide NTP service to computers all over the world. The pool is considered the default "time keeper" for most Linux installations.

Configure NTPD for time synchronization

Network Time Protocol Daemon (NTPD) is responsible for setting and maintaining the correct time on all servers. NTPD works by sending messages to various servers at set time intervals.

First, you will turn off time synchronization and add the universe repository to Linux. Then, you will install the NTP package, verify that NTP shows the correct time source and that NTP time synchronization is active.

Summary Conclusion

By taking this lab, you will learn how to:

  • Set the Linux server's timezone
  • Set the local date and time
  • Enable/disable time synchronization (NTP) by using the timedatectl command
  • Install the NTP package and verify that the time is synchronized