HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

ntpdate — Synchronize and set the date and time via NTP. More information: <https://manned.org/ntpdate>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandsynchronizeandclidatentpdateset
linux

Problem

How to use the ntpdate command: Synchronize and set the date and time via NTP. More information: <https://manned.org/ntpdate>.

Solution

ntpdate — Synchronize and set the date and time via NTP. More information: <https://manned.org/ntpdate>.

Synchronize and set date and time:
sudo ntpdate {{host}}


Query the host without setting the time:
ntpdate -q {{host}}


Use an unprivileged port in case a firewall is blocking privileged ports:
sudo ntpdate -u {{host}}


Force time to be stepped using settimeofday instead of slewed:
sudo ntpdate -b {{host}}

Code Snippets

Synchronize and set date and time

sudo ntpdate {{host}}

Query the host without setting the time

ntpdate -q {{host}}

Use an unprivileged port in case a firewall is blocking privileged ports

sudo ntpdate -u {{host}}

Force time to be stepped using `settimeofday` instead of `slewed`

sudo ntpdate -b {{host}}

Context

tldr-pages: linux/ntpdate

Revisions (0)

No revisions yet.