How to Sync Your Linux with NTP

Windows Articles

How to install Brackets in Windows 10 plus extensions

Hello! Brackets is an open-source code editor designed by Adobe for web developers. Additionally, it has a very simple and modern interface...

How to install Docker on OpenSUSE 15.2 / 15.1?

Docker is a fairly popular technology in today’s sysadmin. It is logical to think because it means a complete change in the...

How to analyze the network with IP Tools for Android

Hi! If you want to analyze and adjust the network almost professionally, then this post is for you. Indeed, IP Tools is...

How to install GNU Fortran on Ubuntu 20.04 / 18.04?

Not everything old is bad. This is how it is. Well, while it is true that there are many programming languages today, there are...

How to install Unity Desktop on Ubuntu 20.04?

Unity Desktop was for a long time the default desktop environment in Ubuntu. Thanks to this, Ubuntu gained a great personality and...
Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

Time is the most important value in our life, philosophically speaking. Since the starting of our life, we’ve been taught that time is money. That’s why it’s really important to maintain the time in our life. That’s even a burning truth to the systems where even the slightest bit of delay in the system can cause serious and troublesome issues in lots of places. The best solution for this problem is NTP.

That’s what I faced several days ago when the computer time went haywire. Almost all the major sites were blocked in my device, thinking that I may be a hacker or some intruder. Thankfully, I synced with the NTP and fixed the issue. It’s always a good idea to sync your system with any NTP for keeping your PC’s time always up-to-date.

What is NTP?

NTP stands for Network Time Protocol. It’s a networking protocol that’s being used widely for syncing clocks between computer systems where system latency is a big factor. It’s also quite useful for keeping your system’s time up-to-date. In fact, it’s one of the oldest network protocols still in use.

Syncing your Linux with NTP

In most of the Linux systems, it’s done automatically. However, your system is prone to go haywire time to time. Let’s fix the system once and for all.

Installing NTPd

It comes pre-installed in lots of Linux distros, but just to make sure that it’s present in your system.

  • Ubuntu
sudo apt install ntp

  • Debian
sudo apt-get install ntp
  • Fedora
sudo dnf install ntp
  • OpenSUSE
sudo zypper install ntp
  • Arch Linux
sudo pacman -S ntp

Configuring the NTP server

The NTPd program comes up with preset NTP servers in the configuration file. Those are enough for average users, but I recommend to switch to better servers like Google NTP.

For adding the Google NTP server in the system, run this command:

sudo nano /etc/ntp.conf

Now, add these lines in the file:

server time.google.com iburst

server time2.google.com iburst

server time3.google.com iburst

Setting time zone

Before NTPd starts syncing with the time server, it needs to know your time zone. For setting that up, start a terminal and run this command:

tzselect

The wizard will walk you through setting up your time zone.

Starting NTPd

Open a terminal and run the following commands:

sudo systemctl start ntp.service

sudo systemctl enable ntp.service

Enjoy the super accurate timing of your PC!

Love Linux? Then try out the latest features of Ubuntu 18.04 LTS!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install Brackets in Windows 10 plus extensions

Hello! Brackets is an open-source code editor designed by Adobe for web developers. Additionally, it has a very simple and modern interface...

How to install Docker on OpenSUSE 15.2 / 15.1?

Docker is a fairly popular technology in today’s sysadmin. It is logical to think because it means a complete change in the...

How to analyze the network with IP Tools for Android

Hi! If you want to analyze and adjust the network almost professionally, then this post is for you. Indeed, IP Tools is...

How to install GNU Fortran on Ubuntu 20.04 / 18.04?

Not everything old is bad. This is how it is. Well, while it is true that there are many programming languages today, there are...

How to install Unity Desktop on Ubuntu 20.04?

Unity Desktop was for a long time the default desktop environment in Ubuntu. Thanks to this, Ubuntu gained a great personality and...