Sunday, November 13, 2011

Sync Your System Clock With Internet Time Servers Automatically On Ubuntu/Debian

Sometimes, under Ubuntu or Debian the time displayed by your system clock becomes slightly wrong, and you are obliged to correct it manually. However, when rebooting your system, you will discover that the time is wrong again. The solution to this problem is that you have to synchronize your system clock with the NTP server.

Here are the instructions to follow:

1. Open the Terminal and install this package (root privileges are required):

apt-get install ntpdate

2. The synchronization will now occur automatically.

Here are some time commands that you may need:

- To know the current date, issue this command:


- To know your time zone, run this command:

cat /etc/timezone

- To select another geographic area, run this command:

dpkg-reconfigure tzdata

That's it!