Ntp

NTP (Network Time Protocol) is used to synchronize the system time with other devices over the network, this usually happens in a client-server model.

Installation
Install :

Or alternatively, you can use instead.

Configuration
The only configuration file is which is well explained with comments. Here are some of the more important settings.

Server
Here you can specify with which servers you want to synchronize your local time.

Per default the gentoo servers are listed and enabled. A list of available servers can be found here: ntp.org You can also define a home or company server here, given that ntpd is running and the machine is allowed to.

Permissions
To control who is allowed to synchronize with this machine and change the configuration, you can change these options.


 * access to NTP service allowed only from localhost.


 * access to NTP service allowed only from the 192.168.0.0/24 network.

Usage
Basic tools and common usage

ntpd service
Add ntpd to the default runlevel to have the time synchronized automatically

If ntpd is run as a service, the time will automatically synchronize as long as the difference between the local time and the time on the server is less than 1000s (~17min). So it is pretty common to adjust the time initially to whatever the server time is as a trusted source:

ntpdate
This used to be the client, but its functionality is now moved into ntpd itself. It is purely to set the local time when started and then exits (not a service):

External resources

 * ntp.org