Files
cheatsheet-tldr/tldr/linux/ntpdate
2024-05-29 00:14:54 +00:00

26 lines
535 B
Plaintext

---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# 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}}`