{"id":16611,"date":"2019-04-08T07:29:00","date_gmt":"2019-04-08T07:29:00","guid":{"rendered":"https:\/\/www.hostinger.com\/tutorials\/?p=16611"},"modified":"2024-09-06T04:44:22","modified_gmt":"2024-09-06T04:44:22","slug":"how-to-change-timezone-in-ubuntu","status":"publish","type":"post","link":"\/uk\/tutorials\/how-to-change-timezone-in-ubuntu","title":{"rendered":"How to Change the Timezone in Ubuntu (3 Easy Methods)"},"content":{"rendered":"<p>Using the correct date and time on your Ubuntu system is essential for tasks and processes such as data logging, <a href=\"\/uk\/tutorials\/cron-job\">cron jobs<\/a>, and the overall management of a Linux-based <a href=\"\/uk\/tutorials\/getting-started-with-vps-hosting\">VPS setup<\/a>.<\/p><p>Most applications also use the timezone to manage their data accordingly. When it comes to Ubuntu, the system&rsquo;s timezone is set during the initial setup, but users can still change it.<\/p><p>This article will discuss how to set a timezone in Ubuntu 22.04 using three easy methods.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1024\" height=\"283\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet-1024x283.png\" alt=\"\" class=\"wp-image-69262\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet-1536x425.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet-300x83.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet-150x41.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet-768x212.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2022\/11\/Linux-cheat-sheet.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-how-to-set-the-timezone-on-ubuntu\">How to Set the Timezone on Ubuntu<\/h2><p>In this section, we will show step-by-step how to set the timezone on <a href=\"\/uk\/tutorials\/what-is-ubuntu\">Ubuntu<\/a> 22.04 so you can better manage your <a href=\"\/uk\/vps\/ubuntu-hosting\">Ubuntu VPS<\/a>. Make sure to log in as a <strong>root user<\/strong> to perform the following actions.<\/p><h3 class=\"wp-block-heading\" id=\"h-using-the-graphical-user-interface-gui\">Using the Graphical User Interface (GUI)<\/h3><p>The most convenient way to change the timezone on an Ubuntu system is via the <strong>graphical user interface (GUI)<\/strong>. Since it is accessible from the desktop, users don&rsquo;t have to run any commands.<\/p><p>Here&rsquo;s how to change the timezone using the GUI:<\/p><ol class=\"wp-block-list\">\n<li>Click on the <strong>System <\/strong>menu on the top-right corner of the screen.<\/li>\n\n\n\n<li>Select <strong>Settings <\/strong>and go to the <strong>Date &amp; Time<\/strong> tab.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-Date-Time-menu-of-Ubuntu.png\"><img decoding=\"async\" width=\"1024\" height=\"576\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-Date-Time-menu-of-Ubuntu-1024x576.png\" alt=\"The Date and Time menu of Ubuntu desktop\" class=\"wp-image-55929\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Date-Time-menu-of-Ubuntu-1024x576.png 1024w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Date-Time-menu-of-Ubuntu-300x169.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Date-Time-menu-of-Ubuntu-150x84.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Date-Time-menu-of-Ubuntu-768x432.png 768w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Date-Time-menu-of-Ubuntu.png 1313w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>Turn the <strong>Automatic Time Zone<\/strong> option to <strong>OFF<\/strong>. If it is <strong>ON <\/strong>and the system is connected to the internet, it will automatically set the timezone according to the user&rsquo;s location.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-Automatic-Date-Time-option-turned-off.png\"><img decoding=\"async\" width=\"602\" height=\"223\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-Automatic-Date-Time-option-turned-off.png\" alt=\"The Automatic Date and Time option turned off\" class=\"wp-image-55930\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Automatic-Date-Time-option-turned-off.png 602w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Automatic-Date-Time-option-turned-off-300x111.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Automatic-Date-Time-option-turned-off-150x56.png 150w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"4\">\n<li>Click on <strong>Time Zone<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-Date-Time-menu-of-Ubuntu-with-the-Time-Zone-option-highlighted.png\"><img decoding=\"async\" width=\"601\" height=\"220\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-Date-Time-menu-of-Ubuntu-with-the-Time-Zone-option-highlighted.png\" alt=\"The date and time menu of Ubuntu with the time zone option highlighted\" class=\"wp-image-55931\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Date-Time-menu-of-Ubuntu-with-the-Time-Zone-option-highlighted.png 601w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Date-Time-menu-of-Ubuntu-with-the-Time-Zone-option-highlighted-300x110.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-Date-Time-menu-of-Ubuntu-with-the-Time-Zone-option-highlighted-150x55.png 150w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"5\">\n<li>A new window will open. Select the new timezone by clicking on the map directly or using the search bar.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/Ubuntus-Time-Zone-map-display.png\"><img decoding=\"async\" width=\"818\" height=\"473\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/Ubuntus-Time-Zone-map-display.png\" alt=\"Ubuntu's Time Zone map display\" class=\"wp-image-55932\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/Ubuntus-Time-Zone-map-display.png 818w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/Ubuntus-Time-Zone-map-display-300x173.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/Ubuntus-Time-Zone-map-display-150x87.png 150w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/Ubuntus-Time-Zone-map-display-768x444.png 768w\" sizes=\"(max-width: 818px) 100vw, 818px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"6\">\n<li>Once done, click on the <strong>x <\/strong>button to close the window.<\/li>\n<\/ol><p>Check the <strong>Time Zone<\/strong> box inside the <strong>Date &amp; Time<\/strong> tab to verify if the new timezone and current date were successfully updated.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/Date-Time-and-Time-Zone-changed.png\"><img decoding=\"async\" width=\"600\" height=\"223\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/Date-Time-and-Time-Zone-changed.png\" alt=\"Date Time and Time Zone in Ubuntu desktop changed\" class=\"wp-image-55933\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/Date-Time-and-Time-Zone-changed.png 600w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/Date-Time-and-Time-Zone-changed-300x112.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/Date-Time-and-Time-Zone-changed-150x56.png 150w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-using-timedatectl-via-the-command-line\">Using timedatectl (via the Command Line)<\/h3><p>There are two ways to set up a server&rsquo;s timezone in the command line &ndash; using <strong>tzselect<\/strong> or <strong>timedatectl<\/strong>. However, the first command only works to change the timezone temporarily.<\/p><p>If you opt for <strong>tzselect<\/strong>, the timezone will revert to the one set in the <strong>\/etc\/timezone<\/strong> file after a reboot. You can still use this command as an alternative way to list the timezone options on the system.<\/p><p>To do so, open <strong>Terminal <\/strong>or your command-line interface (CLI) and run the <code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">tzselect <\/code>command. Then, specify the desired timezone and press <strong>Enter.<\/strong><\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/List-timezones-option-on-Ubuntu.png\"><img decoding=\"async\" width=\"537\" height=\"240\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/List-timezones-option-on-Ubuntu.png\" alt=\"List timezones option on Ubuntu terminal\" class=\"wp-image-55934\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/List-timezones-option-on-Ubuntu.png 537w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/List-timezones-option-on-Ubuntu-300x134.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/List-timezones-option-on-Ubuntu-150x67.png 150w\" sizes=\"(max-width: 537px) 100vw, 537px\" \/><\/a><\/figure><\/div><p>One of the best methods to permanently change the timezone on Ubuntu 22.04 is using the <code data-enlighter-language=\"generic\" class=\"EnlighterJSRAW\">timedatectl <\/code>command. It is a Linux utility that allows users to review and change the configuration of the system clock.<\/p><p>In addition, the <strong>timedatectl<\/strong> command enables users to modify the system&rsquo;s current time and date, set a timezone, and automatically synchronize the clock via a remote server.<\/p><p>Here&rsquo;s how to change the timezone using this method:<\/p><ol class=\"wp-block-list\">\n<li>Open your CLI. Check the current system&rsquo;s timezone by running the timedatectl command.<\/li>\n<\/ol><ol class=\"wp-block-list\" start=\"2\">\n<li>The output below shows that the local time is set to Coordinated Universal Time (UTC).<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systems-local-timezone-is-set-to-UTC.png\"><img decoding=\"async\" width=\"463\" height=\"152\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/The-systems-local-timezone-is-set-to-UTC.png\" alt=\"Output showing that the system's local timezone is set to UTC\" class=\"wp-image-55935\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-systems-local-timezone-is-set-to-UTC.png 463w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-systems-local-timezone-is-set-to-UTC-300x98.png 300w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/The-systems-local-timezone-is-set-to-UTC-150x49.png 150w\" sizes=\"(max-width: 463px) 100vw, 463px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"3\">\n<li>Find out the full name of the timezone. Usually, the naming convention uses the Region\/City format. Insert the command below to see the timezone list:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">timedatectl list-timezones<\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"\/uk\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/List-of-timezones-on-Ubuntu.png\"><img decoding=\"async\" width=\"334\" height=\"403\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2019\/04\/List-of-timezones-on-Ubuntu.png\" alt=\"List of timezones on Ubuntu terminal\" class=\"wp-image-55936\" srcset=\"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/List-of-timezones-on-Ubuntu.png 334w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/List-of-timezones-on-Ubuntu-249x300.png 249w, https:\/\/www.hostinger.com\/uk\/tutorials\/wp-content\/uploads\/sites\/51\/2019\/04\/List-of-timezones-on-Ubuntu-124x150.png 124w\" sizes=\"(max-width: 334px) 100vw, 334px\" \/><\/a><\/figure><\/div><ol class=\"wp-block-list\" start=\"4\">\n<li>Alternatively, combine the <strong>timedatectl<\/strong> command with the <a href=\"\/uk\/tutorials\/grep-command-in-linux-useful-examples\/\"><strong>grep <\/strong>command<\/a> to filter the search using the name of a city.<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">timedatectl list-timezones | grep Paris<\/pre><ol class=\"wp-block-list\" start=\"5\">\n<li>Press <strong>CTRL + C<\/strong> to exit.<\/li>\n\n\n\n<li>Once you have decided which timezone to select, run the following command to make the change. Note that it will not produce any output:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">sudo timedatectl set-timezone [timezone]<\/pre><ol class=\"wp-block-list\" start=\"7\">\n<li>Insert the command below and press <strong>Enter <\/strong>to verify the update:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">timedatectl<\/pre><p>The <strong>time zone<\/strong> and <strong>system clock synchronized<\/strong> values show that the new local time was updated successfully. The system&rsquo;s timezone information is stored in the<strong> \/etc\/timezone<\/strong> directory, which you can also check to verify the changes.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>Using the correct timezone is important for a system&rsquo;s processes, as it defines when those tasks will be deployed and done. On Ubuntu, users usually set up the system clock during the initial installation.<\/p><p>However, the current timezone is adjustable using three easy methods &ndash; the graphical user interface (GUI), the <strong>timedatectl<\/strong> command, or the <strong>tzdata<\/strong> command.<\/p><p>We hope this article has helped you set up the timezone on your Ubuntu 22.04 system. If you have any questions or suggestions, leave them in the comments section below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using the correct date and time on your Ubuntu system is essential for tasks and processes such as data logging, cron jobs, and the overall management of a Linux-based VPS setup. Most applications also use the timezone to manage their data accordingly. When it comes to Ubuntu, the system&rsquo;s timezone is set during the initial [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/uk\/tutorials\/how-to-change-timezone-in-ubuntu\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":110,"featured_media":62378,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"3 Ways to Set Timezone in Ubuntu (All Versions)","rank_math_description":"Read on to learn how to permanently set timezone in Ubuntu using GUI as well as terminal with timedatectl and tzdata commands.","rank_math_focus_keyword":"change timezone ubuntu","footnotes":""},"categories":[22644,22640],"tags":[],"class_list":["post-16611","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-managing-monitoring-and-security","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-change-timezone-in-ubuntu","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/regler-le-fuseau-horaire-sur-ubuntu","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/establecer-zona-horaria-ubuntu","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-setting-timezone-ubuntu","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-change-timezone-in-ubuntu","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-change-timezone-in-ubuntu\/","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-change-timezone-in-ubuntu\/","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/establecer-zona-horaria-ubuntu","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/establecer-zona-horaria-ubuntu","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/establecer-zona-horaria-ubuntu","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-change-timezone-in-ubuntu","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-change-timezone-in-ubuntu","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-change-timezone-in-ubuntu","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-change-timezone-in-ubuntu","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/16611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/comments?post=16611"}],"version-history":[{"count":23,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/16611\/revisions"}],"predecessor-version":[{"id":115312,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/posts\/16611\/revisions\/115312"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/media\/62378"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/media?parent=16611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/categories?post=16611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/uk\/tutorials\/wp-json\/wp\/v2\/tags?post=16611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}