{"id":206347,"date":"2023-12-28T13:54:38","date_gmt":"2023-12-28T13:54:38","guid":{"rendered":"https:\/\/ded9.com\/?p=206347"},"modified":"2026-02-03T12:17:05","modified_gmt":"2026-02-03T12:17:05","slug":"how-to-change-time-zone-in-ubuntu","status":"publish","type":"post","link":"https:\/\/ded9.com\/de\/how-to-change-time-zone-in-ubuntu\/","title":{"rendered":"How to Change Time Zone in Ubuntu \u2013 Simple Step\u2011by\u2011Step Guide"},"content":{"rendered":"<p style=\"text-align: justify;\">Properly configuring the system timezone is a critical step in managing any server, especially in environments that require accurate timekeeping for logging, automation, and cron jobs. Incorrect timezone settings can lead to issues with job scheduling, backups, and even network time synchronization (<a href=\"https:\/\/en.wikipedia.org\/wiki\/Network_Time_Protocol\" target=\"_blank\" rel=\"noopener\">NTP<\/a>). In this guide, we will walk you through two efficient methods to change the timezone in Ubuntu-based systems: <strong>tzselect<\/strong> and <strong>timedatectl<\/strong>.<\/p>\n<h2 style=\"text-align: justify;\">Why is Setting the Correct Timezone Important?<\/h2>\n<p style=\"text-align: justify;\">Setting the correct timezone impacts several aspects of system performance and accuracy, such as:<\/p>\n<ul style=\"text-align: justify;\">\n<li><strong>Logs:<\/strong> Logs generated by the system and applications will have accurate timestamps, which are crucial for debugging and auditing.<\/li>\n<li><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\"><strong>Automation:<\/strong> Tasks scheduled through cron jobs or other automation tools rely on accurate time settings. An incorrect time zone can cause tasks to run at unexpected times.<\/span><\/li>\n<li><strong>Network Synchronization:<\/strong> Servers using NTP propagate time to other network nodes. A wrong timezone can lead to widespread inconsistencies.<\/li>\n<\/ul>\n<h3>Method 1: Changing the Timezone with <code>tzselect<\/code><\/h3>\n<p style=\"text-align: justify;\">The <code>tzselect<\/code> The command provides a simple and interactive way to change the system\u2019s timezone. Follow these steps:<\/p>\n<ol style=\"text-align: justify;\">\n<li><strong>Run the <code>tzselect<\/code> Command<\/strong>: Open the terminal and enter the following command:\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo tzselect<\/pre>\n<\/div>\n<\/li>\n<li><code class=\"language-bash\"><\/code><strong>Select Geographic Region<\/strong>. The terminal will display a list of geographic regions. Select the one that matches your location by entering the corresponding number.<\/li>\n<li><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\"><strong>Select a Specific Timezone<\/strong>. After selecting a region, you\u2019ll see a list of time zones within that region. Enter your time zone&#8217;s number to choose it.<\/span><\/li>\n<li><strong>Set the Chosen Timezone.<\/strong>\u00a0Once you\u2019ve made your selection, <code>tzselect<\/code> will display the chosen timezone string. To apply it system-wide, run the following command with your timezone string:\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo ln -sf \/usr\/share\/zoneinfo\/Region\/City \/etc\/localtime<\/pre>\n<\/div>\n<p>Replace <code>Region\/City<\/code> with the string provided by <code>tzselect<\/code>.<\/li>\n<li><strong>Verify the Change<\/strong> Confirm the changes by running:\n<div class=\"wp-block-codemirror-blocks code-block\">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">timedatectl<\/pre>\n<\/div>\n<p>The output should display the newly set timezone.<\/li>\n<\/ol>\n<h3>Method 2: Changing the Timezone with <code>timedatectl<\/code><\/h3>\n<p style=\"text-align: justify;\">The <code>timedatectl<\/code> Command is a versatile tool for managing date and time configurations on Linux systems. It provides a more comprehensive solution compared to <code>tzselect<\/code>.<\/p>\n<ol style=\"text-align: justify;\">\n<li><strong>List Available Timezones<\/strong> To view all available timezones, use:\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">timedatectl list-timezones<\/pre>\n<\/div>\n<p>You can scroll through the list or press <code>CTRL + C<\/code> to exit.<\/li>\n<li><strong>Filter Timezones<\/strong>. If you want to filter the results for a specific region or city, use the <code>grep<\/code> command. For example, to find time zones for Caracas:\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">timedatectl list-timezones | grep Caracas<\/pre>\n<\/div>\n<\/li>\n<li><strong>Set the Timezone<\/strong>. After identifying the desired timezone, set it using the following command:\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo timedatectl set-timezone Region\/City<\/pre>\n<\/div>\n<p>Replace <code>Region\/City<\/code> with the appropriate timezone string from the list.<\/li>\n<li><strong>Verify the Change<\/strong> Confirm the applied timezone with:\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">timedatectl<\/pre>\n<\/div>\n<p>The output will show the active system time and the configured timezone.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Important Notes:<\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\"><strong>Using NTP:<\/strong> If your server synchronizes time using an NTP server, ensure that it is also synchronized with the new time zone to avoid discrepancies across the network.<\/span><\/li>\n<li><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\"><strong>Automation Tools:<\/strong> After changing the time zone, verify that all automated tasks and cron jobs run as expected and adjust their schedules if necessary.<\/span><\/li>\n<li><strong>Backup Configurations:<\/strong> Ensure that backup jobs are aligned with the updated timezone to prevent data loss or duplication.<\/li>\n<\/ul>\n<h3 style=\"text-align: justify;\">Common Issues and Troubleshooting<\/h3>\n<ol style=\"text-align: justify;\">\n<li><strong>Incorrect Timezone Applied:<\/strong> Double-check the syntax and spelling of the <code>Region\/City<\/code> string.<\/li>\n<li><strong>NTP Overwrites the Change:<\/strong> Disable NTP temporarily if manual timezone settings are being overwritten:\n<div class=\"wp-block-codemirror-blocks code-block \">\n<pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;shell&quot;,&quot;mime&quot;:&quot;text\/x-sh&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;lineWrapping&quot;:false,&quot;styleActiveLine&quot;:false,&quot;readOnly&quot;:true,&quot;align&quot;:&quot;&quot;}\">sudo timedatectl set-ntp false<\/pre>\n<\/div>\n<p>Re-enable it once the timezone configuration is stable.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">By following this guide, you can easily configure the correct timezone on your Ubuntu-based server, ensuring optimal performance and reliability across your system operations. Whether you choose <code>tzselect<\/code> for its simplicity or <code>timedatectl<\/code> For its advanced features, these tools equip you to manage time zones effectively.<\/p>\n<h2 style=\"text-align: justify;\">Conclusion<\/h2>\n<p style=\"text-align: justify;\">Configuring the correct timezone on an <a href=\"https:\/\/ded9.com\/centos-or-ubuntu\/\">Ubuntu<\/a> server is an essential step to ensure the accuracy of logs, the reliability of automation tasks, and the consistency of network-wide time synchronization. Both <code>tzselect<\/code> and <code>timedatectl<\/code> offer straightforward methods to accomplish this task, catering to different levels of user expertise. By following the instructions in this guide, you can set your system\u2019s timezone confidently and address any potential issues that may arise from improper configurations. This simple but critical configuration will ensure smooth system operation and accurate scheduling in all your server-related activities.<\/p>\n<h2>FAQ<\/h2>\n<div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do I check the current time zone on Ubuntu?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use the timedatectl command to display your system\u2019s current time zone settings.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What command sets a new time zone in Ubuntu?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Run sudo timedatectl set\u2011timezone Your\/Timezone to update the system time zone.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Can I change the time zone using the Ubuntu desktop interface?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes \u2014 open Settings, go to Date &amp; Time, and select your preferred time zone.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Properly configuring the system timezone is a critical step in managing any server, especially in environments that require accurate timekeeping for logging, automation, and cron jobs. Incorrect timezone settings can lead to issues with job scheduling, backups, and even network time synchronization (NTP). In this guide, we will walk you through two efficient methods to [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":206349,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11515],"tags":[9882,961],"class_list":["post-206347","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu-2","tag-ntp","tag-ubuntu"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/206347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/comments?post=206347"}],"version-history":[{"count":4,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/206347\/revisions"}],"predecessor-version":[{"id":266934,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/206347\/revisions\/266934"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media\/206349"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media?parent=206347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/categories?post=206347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/tags?post=206347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}