ntpdate-debian
Set system time from NTP servers
SYNOPSIS
ntpdate-debian
DESCRIPTION
ntpdate-debian is a wrapper script primarily found on Debian-based Linux distributions, designed to perform a one-shot synchronization of the system clock with Network Time Protocol (NTP) servers. It essentially automates the use of the ntpdate command, reading its configuration from files such as /etc/default/ntpdate or /etc/ntp.conf to determine which NTP servers to query.
Unlike continuous NTP daemons like ntpd or chronyd, ntpdate-debian performs a single, immediate adjustment to the system time. Its main use cases include setting the system clock accurately during boot-up, especially when the hardware clock is significantly off, or on systems that do not run a persistent NTP service.
CAVEATS
ntpdate (and by extension ntpdate-debian) is considered largely deprecated for routine, continuous time synchronization in favor of more robust NTP daemons like ntpd or chronyd, which "slew" (gradually adjust) the time rather than "step" (jump) it. Stepping the clock can cause issues for applications sensitive to time continuity.
It requires root privileges to modify the system clock. Its primary role has shifted to initial synchronization at boot or when the clock is severely out of sync.
CONFIGURATION
The behavior of ntpdate-debian is primarily controlled by settings in the file /etc/default/ntpdate. This file can specify the NTP servers to use (via the NTPDATE_NTP_SERVERS variable) or instruct the script to read server lists from /etc/ntp.conf (by setting NTPDATE_USE_NTP_CONF=yes). When executed, it consults these settings to determine which NTP servers to query for time synchronization.
UNDERLYING OPERATION
ntpdate-debian itself is a shell script that executes the ntpdate command. It often passes arguments like -s (silent mode, logging to syslog) to ntpdate implicitly. While the script itself doesn't expose many command-line options, the underlying ntpdate command has various options for debugging, specifying ports, or forcing adjustments, which are typically configured within the system rather than passed directly to ntpdate-debian by a user.
HISTORY
The ntpdate-debian script was developed as a Debian-specific wrapper around the standard ntpdate utility. Its creation aimed to integrate one-shot NTP synchronization smoothly into the Debian boot process and system administration practices, particularly by leveraging common configuration files like /etc/default/ntpdate. While ntpdate has been a long-standing tool for immediate time adjustments, ntpdate-debian streamlined its usage within the Debian ecosystem.
Over time, as continuous NTP daemons became the preferred method for accurate timekeeping, the role of ntpdate-debian has largely shifted to an initial synchronization step rather than a regular time-sync mechanism.
SEE ALSO
ntpdate(8), ntpd(8), chronyd(8), timedatectl(1), hwclock(8)