Keeping your clock in sync with NTP
It's incredibly important for Linux servers to keep their time synchronized, as strange things can happen when a server's clock is wrong. One issue I've run into that's especially problematic is file synchronization utilities, which will exhibit strange behavior when the underlying clock of the server is incorrect. However, Ubuntu servers provide packages for the NTP client and server within the default repositories to help keep your time in sync.
Before we set up NTP, we should first ensure that our server is set up for the correct time zone. If you use the timedatectl
command with no options, it will show you what your current settings are. If I run timedatectl
on one of my servers, I see the following output:
Time zone: America/Detroit (EDT, -0400)
For my use case, that's the proper setting. On your end though, the results may not be correct. If not, then we can set the appropriate time zone also with the...