How To Set Up Timezone and NTP Synchronization on Ubuntu 14.04 [Quickstart]

How To Set Up Timezone and NTP Synchronization on Ubuntu 14.04 [Quickstart]


Setting your server’s clock and timezone properly is essential in ensuring the healthy operation of distributed systems and maintaining accurate log timestamps. This tutorial will show you how to configure NTP time synchronization and set the timezone on an Ubuntu 14.04 server.

A more detailed version of this tutorial, with better explanations of each step, can be found here.

Step 1: List available timezones

  1. timedatectl list-timezones
  • Press Space to scroll to the next page, b to scroll back a page.
  • Once you find the timezone you want to use, press q to go back to the command line.

Step 2: Set the desired timezone

Be sure to replace desired_timezone with the timezone you selected from the list:

  1. sudo timedatectl set-timezone desired_timezone

For example, to set the timezone to New York use this command:

  1. sudo timedatectl set-timezone America/New_York

Step 3: Verify that the timezone has been set properly

  1. timedatectl
Example output:
Local time: Fri 2016-03-25 12:00:43 EDT Universal time: Fri 2016-03-25 16:00:43 UTC Timezone: America/New_York (EDT, -0400) . . .

Step 4: Install NTP

  1. sudo apt-get update
  2. sudo apt-get install ntp

Once the NTP package installation is completed, your server will have NTP synchronization enabled!

Here is a link to a more detailed tutorial that is related to this guide:

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Praneeth Umashankar
DigitalOcean Employee
DigitalOcean Employee badge
January 14, 2020

This tutorial holds good for other ubuntu versions also.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel