Forrest logo
back to the ntpdate tool

ntpdate:tldr:11435

ntpdate: Synchronize and set date and time.
$ sudo ntpdate ${host}
try on your machine

This command is used to update the system's date and time by synchronizing it with a Network Time Protocol (NTP) server specified by the variable ${host}.

Here's a breakdown of the command:

  • sudo: It is a command that allows you to run commands with administrative or superuser privileges. By using sudo, you can execute the following command with elevated permissions.

  • ntpdate: This is a command-line utility used to query NTP servers and update the system's date and time based on the response received.

  • ${host}: This is a variable that represents the NTP server hostname or IP address. By using ${host}, you can substitute the actual hostname or IP address of the NTP server you want to synchronize with.

When you execute this command with the appropriate NTP server hostname or IP address, it requests the time information from that server and adjusts your system's clock accordingly. This helps ensure that your system's time is accurate and synchronized with a reliable time source.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ntpdate tool