Time synchronization on Linux

Here's simple time synchronization trick that is one of the easiest I've found. The example below is using the Debian package manager to download and install rdate, so if you're not using debian, you'll have to download and install rdate using a different method.

apt-get install rdate
rdate time.nrc.ca

And that's it! You can replace time.nrc.ca with another time server that's closer to you. You can put an entry in your crontab like this (path might be different on your system)...

0 1 * * * /usr/sbin/rdate time.nrc.ca > /dev/null 2>&1

This will synchronize your clock every night at 1:00am. I know there are a bunch of other ways to do this, but I like this method because it's the easiest I've found and it works well from the command line.

This TechByte applies to most distributions of Linux, however the examples are specific to Debian Sarge.


Author: DPAK
Created: Sep 21 2005
Categories: Linux
TechByte #30

Warning: By visiting this site and/or by using any information contained herein, you agree to the Techbytes.ca terms of use.



Add a comment about this TechByte

If you wish to add a comment regarding this TechByte, please use the form below. Please note that by submitting comments using this form you are allowing all of the information submitted to be visible on this website. Any comments submitted using this form will only be shown on the website if they are approved by the administrators of this site. IF APPROVED, COMMENTS MAY TAKE SEVERAL DAYS TO BE POSTED.

Posted By: (Optional)

Comments:


Other TechBytes: