PDF download Download Article
A quick and easy guide to changing time zones in any Linux distribution
PDF download Download Article

This wikiHow teaches you how to change the time zone on a Linux computer. You can change the timezone on every Linux distribution by using the command line, or you can use the selection menu in the command line for different Linux distributions. If you're using Mint , Ubuntu , or any other distribution with a simple user interface and settings menu, you can also change the time zone settings from there.

Linux Time Zone Setup

Open the Terminal and type in "tzselect" to open a list of time zones. Navigate through the menus to select your country and location. When you find the correct time zone, type in the number and hit Enter to set it on your machine.

Method 1
Method 1 of 4:

Using the Command Line

PDF download Download Article
  1. Open Terminal . Select the Terminal program from your Linux programs, or press Ctrl + Alt + T on your keyboard.
  2. Type date into Terminal and press Enter . The terminal will display the date in Weekday Month Day Time TimeZone Year format.
    • For example, you might see something like Wed Mar 7 07:38:23 EDT 2017 wherein "EDT" refers to the current time zone (Eastern Daylight Time).
    Advertisement
  3. Type in cd /usr/share/zoneinfo and press Enter , then type in tzselect and press Enter to display a list of locations.
    • The /usr/share/zoneinfo directory may vary depending on your Linux distribution.
  4. Type in a selection number that pertains to your general location, then press Enter .
  5. Type in a selection number from the on-screen list and press Enter .
  6. Type in a selection number to select the preferred time zone region and press Enter .
    • If your city is not listed in the time zone list, pick a different city from your same time zone.
  7. In the following prompt, confirm that the local time is correct by typing 1 and then pressing Enter .
    • If the time isn't correct, type in 2 and press Enter , then select a new continent and repeat the process.
  8. Run the date command again and check that the time zone corresponds to the one you just changed to. If you see you new time zone listed, you have successfully changed your computer's time zone.
  9. Most modern distributions have NTP already installed. If your Linux distribution does not, you will need to install the NTP server package. Use the following commands to install it, depending on your Linux distribution:
    • Ubuntu/Mint/Debian : sudo apt install ntpdate
    • CentOS : sudo yum install ntpdate
      sudo /sbin/chkconfig ntpd on
    • Fedora/RedHat : sudo yum install ntpdate
      sudo chkconfig ntpd on
    • Enter ntpdate server link && hwclock –w after the installation command, making sure to enter the link to the website in place of server link .
  10. Advertisement
Method 2
Method 2 of 4:

Using the Timezone Selection Menu

PDF download Download Article
  1. Select the Terminal program from your Linux programs, or press Ctrl + Alt + T on your keyboard.
  2. Depending on your Linux distribution, this command will vary:
    • Ubuntu and Mint - sudo dpkg-reconfigure tzdata followed by the admin/user password.
    • Redhat - redhat-config-date
    • CentOS and Fedora - system-config-date
    • ' FreeBSD and Slackware - tzselect
  3. Use the arrow keys to select the geographic area the country is found in, then press Enter .
  4. Select the city or region corresponding to your time zone, then press Enter . This will change the time zone on your system. [1]
  5. Advertisement
Method 3
Method 3 of 4:

Using the Graphical User Interface in Ubuntu

PDF download Download Article
  1. It's a combined group of Power, Volume and Networking icons in the upper-right corner of the screen. A drop-down menu will appear.
  2. This gear-shaped icon is in the upper-left corner of the drop-down menu. Doing so opens the Ubuntu Settings.
  3. You'll find this tab on the left side of the window.
  4. Click the blue "Automatic Time Zone" switch in the middle of the page to do so.
    • If the "Automatic Time Zone" switch is grey, skip this step.
  5. It's near the bottom of the window. Doing so opens the Time Zone menu.
  6. Click your approximate location on the world map to do so. You should see the time change to match the selected area's time zone.
  7. This will save your settings and update your time zone accordingly.
  8. Advertisement
Method 4
Method 4 of 4:

Using the Graphical User Interface in LinuxMint

PDF download Download Article
  1. Click Menu in the bottom-left corner of the screen.
  2. It's made of two grey cogs. You'll find it on the left side of the Menu window.
  3. It's in the "Preferences" group of options.
  4. Click a vertical slice of the map to pick that time zone. You should see the clock on the right side of the page immediately change to reflect the selected time zone's time.
  5. If you have logged in as an Administrator, you may not need to enter password. In case you have logged in as a Standard user, type in the Administrator password. Super user privileges are required to make any changes to time zone settings.
  6. It's at the bottom of the prompt. Doing so unlocks the Date & Time menu.
  7. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Video

      Tips

      • On some versions of RedHat Linux, Slackware, Gentoo, SuSE, Debian, Ubuntu, and anything else that is "normal", the command to display and change the time is "date", not "clock".
      • On mobile phones and other small devices that run Linux, the time zone is stored differently. It is written in /etc/TZ. Edit this file manually or use echo (for instance, echo GMT0BST > /etc/TZ to set the the timezone of the United Kingdom).
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • Some applications (such as PHP) have separate timezone settings from the system timezone.
      • On some systems, there is a system utility provided that will prompt for the correct timezone and make the proper changes to the system configuration. For example, Debian provides the "tzsetup" or "tzconfig" utility.
      Advertisement

      About This Article

      Thanks to all authors for creating a page that has been read 1,707,850 times.

      Reader Success Stories

      • Alex Miller

        Feb 8, 2017

        "The commands written out were very helpful. It would be an improvement to the article to fix the screenshots, which ..." more
      Share your story

      Is this article up to date?

      Advertisement