{"id":9384,"date":"2021-01-07T18:58:35","date_gmt":"2021-01-07T23:58:35","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=9384"},"modified":"2021-12-04T06:18:10","modified_gmt":"2021-12-04T06:18:10","slug":"change-time-zone-ubuntu-20-04","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/","title":{"rendered":"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips"},"content":{"rendered":"\n

Usually, you would set the correct time zone during the setup of your Ubuntu Server system. In case this did not happen or a mistake was made, there are some ways to change the time zone on Ubuntu systems using the command-line interface.<\/p>\n\n\n\n

Just to be on the same page, a time zone refers to a designated area of the globe that observes a uniform standard time. They are usually set using country boundaries or regional boundaries within a country, especially for larger ones.<\/p>\n\n\n\n

Confirm the Current Timezone<\/h2>\n\n\n\n

Run the following command:<\/p>\n\n\n\n

$ date<\/code><\/pre>\n\n\n\n

Example Output:<\/p>\n\n\n\n

Thu Jan 7 21:26:59 UTC 2021<\/code><\/pre>\n\n\n\n

The above command shows that this system is running in the UTC timezone.<\/p>\n\n\n\n

The same can be achieved but with more detail by running:<\/p>\n\n\n\n

$ timedatectl<\/code><\/pre>\n\n\n\n

The expected output is:<\/p>\n\n\n\n

                      Local time: Thu 2021-01-07 21:29:05 UTC\n                  Universal time: Thu 2021-01-07 21:29:05 UTC\n                        RTC time: Thu 2021-01-07 21:29:06\n                       Time zone: Etc\/UTC (UTC, +0000)\n       System clock synchronized: yes\nsystemd-timesyncd.service active: yes\n                 RTC in local TZ: no<\/code><\/pre>\n\n\n\n

Now Let’s Change the Time Zone on Ubuntu 20.04<\/p>\n\n\n\n

Option 1 \u2013 Using timedatectl<\/h2>\n\n\n\n

You can find all the available time zones on your system. That way you can know the correct one to pick out.<\/p>\n\n\n\n

$ timedatectl list-timezones<\/code><\/pre>\n\n\n\n

Search for the preferred time zone name from the list then uses one of the following commands to set the new time zone on your system.<\/p>\n\n\n\n

$ sudo timedatectl set-timezone "America\/New_York"<\/code><\/pre>\n\n\n\n

The “America\/New_York<\/strong>” portion of the above command without quotes is what was retrieved from the list. You can get a comprehensive time zone list here<\/a>.<\/p>\n\n\n\n

Option 2 \u2013 Using \/etc\/localtime<\/h2>\n\n\n\n

This is a more involving method and it’s a bit of a hack but nevertheless, it is an alternate option that you can use to change the time zone on Ubuntu.<\/p>\n\n\n\n

First, rename the \/etc\/localtime<\/em> file to keep it as a backup.<\/p>\n\n\n\n

$ mv \/etc\/localtime \/etc\/localtime-backup<\/code><\/pre>\n\n\n\n

Change the symbolic link of the file to the correct time zone configuration file. Find out more about how to create symbolic links in Linux from this post here<\/a>.<\/p>\n\n\n\n

$ ln -s \/usr\/share\/zoneinfo\/America\/New_York \/etc\/localtime<\/code><\/pre>\n\n\n\n

That’s it. You can confirm the changes by running the timedatectl<\/strong><\/em> command again.<\/p>\n","protected":false},"excerpt":{"rendered":"

Usually, you would set the correct time zone during the setup of your Ubuntu Server system. In case this did not happen or a mistake was made, there are some…<\/p>\n","protected":false},"author":1,"featured_media":9385,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,9,16,18],"tags":[183,193,354,573,598],"yoast_head":"\nChange Time Zone on Ubuntu 20.04 | 18.04 With These Tips<\/title>\n<meta name=\"description\" content=\"You can change time zone on Ubuntu 20.04 Linux system or earlier using timedatectl command-line or \/etc\/localtime\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips\" \/>\n<meta property=\"og:description\" content=\"You can change time zone on Ubuntu 20.04 Linux system or earlier using timedatectl command-line or \/etc\/localtime\" \/>\n<meta property=\"og:url\" content=\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Brightwhiz.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/brightwhiz\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-07T23:58:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-04T06:18:10+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Bright\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:site\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Bright\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/\"},\"author\":{\"name\":\"Michael Bright\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\"},\"headline\":\"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips\",\"datePublished\":\"2021-01-07T23:58:35+00:00\",\"dateModified\":\"2021-12-04T06:18:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/\"},\"wordCount\":308,\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg\",\"keywords\":[\"Debian\",\"DevOps\",\"Linux\",\"Systems Administration\",\"Ubuntu\"],\"articleSection\":[\"Articles\",\"Guides\",\"How To\",\"Technology\",\"Tools\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/\",\"url\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/\",\"name\":\"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg\",\"datePublished\":\"2021-01-07T23:58:35+00:00\",\"dateModified\":\"2021-12-04T06:18:10+00:00\",\"description\":\"You can change time zone on Ubuntu 20.04 Linux system or earlier using timedatectl command-line or \/etc\/localtime\",\"breadcrumb\":{\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#primaryimage\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg\",\"width\":1200,\"height\":630,\"caption\":\"Change Time Zone on Ubuntu 20.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/local.brightwhiz\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/local.brightwhiz\/#website\",\"url\":\"http:\/\/local.brightwhiz\/\",\"name\":\"Brightwhiz.com\",\"description\":\"Best Tech guides, Tutorials, and News\",\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/local.brightwhiz\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/local.brightwhiz\/#organization\",\"name\":\"Brightwhiz\",\"url\":\"http:\/\/local.brightwhiz\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"width\":706,\"height\":135,\"caption\":\"Brightwhiz\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/brightwhiz\/\",\"https:\/\/x.com\/brightwhizmag\",\"https:\/\/instagram.com\/bright_whiz\/\",\"https:\/\/www.pinterest.com\/sobbayi\/\",\"https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\",\"name\":\"Michael Bright\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"caption\":\"Michael Bright\"},\"sameAs\":[\"https:\/\/sobbayi.com\"],\"url\":\"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips","description":"You can change time zone on Ubuntu 20.04 Linux system or earlier using timedatectl command-line or \/etc\/localtime","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips","og_description":"You can change time zone on Ubuntu 20.04 Linux system or earlier using timedatectl command-line or \/etc\/localtime","og_url":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/","og_site_name":"Brightwhiz.com","article_publisher":"https:\/\/www.facebook.com\/brightwhiz\/","article_published_time":"2021-01-07T23:58:35+00:00","article_modified_time":"2021-12-04T06:18:10+00:00","og_image":[{"width":1200,"height":630,"url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg","type":"image\/jpeg"}],"author":"Michael Bright","twitter_card":"summary_large_image","twitter_creator":"@brightwhizmag","twitter_site":"@brightwhizmag","twitter_misc":{"Written by":"Michael Bright","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#article","isPartOf":{"@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/"},"author":{"name":"Michael Bright","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32"},"headline":"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips","datePublished":"2021-01-07T23:58:35+00:00","dateModified":"2021-12-04T06:18:10+00:00","mainEntityOfPage":{"@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/"},"wordCount":308,"publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"image":{"@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg","keywords":["Debian","DevOps","Linux","Systems Administration","Ubuntu"],"articleSection":["Articles","Guides","How To","Technology","Tools"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/","url":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/","name":"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips","isPartOf":{"@id":"http:\/\/local.brightwhiz\/#website"},"primaryImageOfPage":{"@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#primaryimage"},"image":{"@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg","datePublished":"2021-01-07T23:58:35+00:00","dateModified":"2021-12-04T06:18:10+00:00","description":"You can change time zone on Ubuntu 20.04 Linux system or earlier using timedatectl command-line or \/etc\/localtime","breadcrumb":{"@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#primaryimage","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/01\/change-time-zone-ubuntu.jpg","width":1200,"height":630,"caption":"Change Time Zone on Ubuntu 20.04"},{"@type":"BreadcrumbList","@id":"http:\/\/local.brightwhiz\/change-time-zone-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/local.brightwhiz\/"},{"@type":"ListItem","position":2,"name":"Change Time Zone on Ubuntu 20.04 | 18.04 With These Tips"}]},{"@type":"WebSite","@id":"http:\/\/local.brightwhiz\/#website","url":"http:\/\/local.brightwhiz\/","name":"Brightwhiz.com","description":"Best Tech guides, Tutorials, and News","publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/local.brightwhiz\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/local.brightwhiz\/#organization","name":"Brightwhiz","url":"http:\/\/local.brightwhiz\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","width":706,"height":135,"caption":"Brightwhiz"},"image":{"@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/brightwhiz\/","https:\/\/x.com\/brightwhizmag","https:\/\/instagram.com\/bright_whiz\/","https:\/\/www.pinterest.com\/sobbayi\/","https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ"]},{"@type":"Person","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32","name":"Michael Bright","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","caption":"Michael Bright"},"sameAs":["https:\/\/sobbayi.com"],"url":"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/"}]}},"_links":{"self":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/9384"}],"collection":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/comments?post=9384"}],"version-history":[{"count":0,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/9384\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media\/9385"}],"wp:attachment":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media?parent=9384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/categories?post=9384"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/tags?post=9384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}