ntpdate
systemLinux/Unix
The ntpdate command is one of the most frequently used commands in Linux/Unix-like operating systems. ntpdate Set the system date and time via NTP
Quick Reference
Command Name:
ntpdate
Category:
system
Platform:
Linux/Unix
Basic Usage:
ntpdate [options] [arguments]
Common Use Cases
Syntax
ntpdate [options] server [server...]
Options
Option | Description |
---|---|
-a |
Enable authentication using keys and key IDs |
-b |
Step time regardless of the difference |
-B |
Force the time to always step instead of slew |
-d |
Enable debugging output |
-e AUTHDELAY |
Specify the authentication processing delay in seconds |
-k KEYFILE |
Specify the path to the file containing authentication keys |
-K KEYID |
Specify the key ID to use for authentication |
-o VERSION |
Specify the NTP version to use (1-4, default: 4) |
-p SAMPLES |
Specify the number of samples to acquire from each server (default: 1) |
-q |
Query only - don't set the clock |
-s |
Log to the system log facility instead of standard output |
-t TIMEOUT |
Specify the time to wait for a response in seconds (default: 1) |
-u |
Use an unprivileged port for outgoing packets |
-v |
Be verbose and show statistics about time adjustment |
Examples
How to Use These Examples
The examples below show common ways to use the ntpdate
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
ntpdate time.nist.gov