How to set System Time using NTP?
NTP is helpful to synchronize system time of computer over a network. This is very useful if you have multiple computers and you require all the computers to have uniform time. You can start the NTP server in one of the machines and synchronize the time across all the machines using this server. This is useful to set the time of your machine accurately.
Take for example, you want to synchronize your machine using a server “server_name”
Start the NTP protocol in the server “server_name”
If you want to accurately synchronize your machine to your Timezone, you can choose any of the continent pools (here Asia is chosen)
$ sudo ntpdate asia.pool.ntp.org
or
$ sudo ntpdate europe.pool.ntp.org
Note that you must have sudo access to run the command else you will get the following error
$ ntpdate europe.pool.ntp.org 9 Feb 22:12:22 ntpdate[21006]: bind() fails: Permission denied
This is because NTP runs on special ports 123 (All ports between 0 and 1024 are special ports and require sudo access to create sockets)
Comments: