- Cheat Sheet and Example is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools






Linux Commands Cheat Sheet

How to use ntpdate command in Linux (with example)

ntpdate options

# man ntpdate


       -B      Force  the  time to always be slewed using the adjtime() system call, even if the measured
               offset is greater than +-500 ms. The default is to step the time using  settimeofday()  if
               the  offset  is greater than +-500 ms. Note that, if the offset is much greater than +-500
               ms in this case, that it can take a long time (hours) to slew the  clock  to  the  correct
               value. During this time. the host should not be used to synchronize clients.

       -b      Force  the  time  to  be  stepped using the settimeofday() system call, rather than slewed
               (default) using the adjtime() system call. This option should be used when called  from  a
               startup file at boot time.

       -u      Direct  ntpdate to use an unprivileged port for outgoing packets. This is most useful when
               behind a firewall that blocks incoming traffic to privileged ports, and you want  to  syn‐
               chronize  with hosts beyond the firewall. Note that the -d option always uses unprivileged



# ntpdate -Buv xx.xx.xx.xx
# /etc/init.d/ntpd stop
# ntpdate -b -f xx.xx.xx.xx
# /etc/init.d/ntpd start


# systemctl stop chronyd
# ntpdate -b -f xx.xx.xx.xx
# systemctl start chronyd

Linux Commands Cheat Sheet

os/linux/command/ntpdate.html.txt · Last modified: 2017/08/16 by admin

Page Tools