21.0k views
0 votes
Show that the changes to the NTP server configuration and

timezone are made and working correctly. Show commands used and any
output.

1 Answer

6 votes

Final answer:

To verify NTP server and timezone configurations, check the NTP service status, list NTP peers with 'ntpq -p', and confirm the active timezone using 'timedatectl status'. Additionally, the hardware clock can be checked with 'sudo hwclock --show'.

Step-by-step explanation:

To verify that the changes to the NTP server configuration and timezone have been successfully made on a system, you can perform several checks.

Check NTP Server Synchronization

First, ensure that the NTP service is running with the command:

sudo systemctl status ntp

or, depending on your operating system, you might use:

sudo systemctl status chronyd

Next, you can use the command:

ntpq -p

to display the list of NTP peers and show the synchronization status with the configured servers.

Check Timezone Configuration

To confirm that the timezone has been set correctly, use the command:

timedatectl status

This will display the currently active timezone among other details. If you have just made changes, it's wise to also verify that the hardware clock is correct:

sudo hwclock --show

If your settings are correct, you will see the NTP servers you are synchronized with and your local time should reflect the timezone you have set.

Note that the exact commands might differ based on the specific Unix-like operating system you are using.

User Dan Brouwer
by
7.7k points