---
title: "Setting the Clock on Your Ubuntu Server: A Step-by-Step Guide"
description: "Setting the timezone for your server is a critical first step in basic system administration. If your server doesn’t tell good time, it can cause you plenty of headaches. Need to know when an email..."
url: https://www.inmotionhosting.com/support/product-guides/cloud-server/ubuntu-timezone-timedatectl/
date: 2023-01-18
modified: 2023-01-18
author: "Christopher Maiorana"
categories: ["Cloud Server Hosting"]
type: post
lang: en
---

# Setting the Clock on Your Ubuntu Server: A Step-by-Step Guide

Setting the timezone for your server is a critical first step in basic system administration. If your server doesn’t tell good time, it can cause you plenty of headaches. Need to know when an email came in? Need a cron job to run at a specific time? Need an SSL to renew at a regular interval? Databases, logging, scheduling, and automation all require accurate timekeeping. You get the picture: time is money. So in this article, we’ll tell you how to set your Ubuntu server to the proper timezone.

- [Get Available Timezones](#list-timezones)
- [Set The Server Timezone To Your Desired Location](#set-timezone)
- [Verify You Have Set The Correct Timezone](#verify-timezone)

Note: the commands in this article require root access or the usage of a sudo user. If you don’t know what that means be sure to check out our full guide on [creating sudo users in Ubuntu](https://www.inmotionhosting.com/support/server/linux/create-sudo-user-ubuntu-20/).

## Get Available Timezones

First of all, before you set the time of your server, you need to know what times are available. For example, I can’t set my Ubuntu clock for Miami, Fl. But I can set it for New York, NY.—which will be the same time, for all intents and purposes.

You can see a list of all available timezones by running this command:

timedatectl list-timezones

That will yield 610 results, so it’s not very helpful. With the grep command, you can limit your output to a search query. For example, if you wanted to find “New York”, you could search for it like this:

timedatectl list-timezones | grep "New"

And you will get the following output:

America/**New**_York
America/North_Dakota/**New**_Salem
Canada/**New**foundland

## Set The Server Timezone To Your Desired Location

Now that you have a list of available timezones, find one that’s closest to you and set it for your system. You can do that with the following command:

sudo timedatectl set-timezone <desired timezone>

For example, if you want to set your timezone for `America/New_York` (as in the above example), the command would look like this:

sudo timedatectl set-timezone America/New_York

## Verify You Have Set The Correct Timezone

Now you have run a command to set the timezone for your server, but how do you know you did it right? You can always double-check you have the correct timezone set with the following command:

timedatectl

This command will output the current time, date, and other timezone information on your Ubuntu server.

You will get an output similar to this one:

![](https://www.inmotionhosting.com/support/wp-content/uploads/2023/01/snap_038.png)

---

Well done! Now your Ubuntu cloud server can tell time properly. For more system admin tutorials and information, check out our full [cloud server guide](https://www.inmotionhosting.com/support/product-guides/cloud-server/).
