{"id":787,"date":"2024-11-20T14:39:56","date_gmt":"2024-11-20T14:39:56","guid":{"rendered":"https:\/\/webhostingdelhi.net.in\/tutorials\/?p=787"},"modified":"2024-11-20T14:39:59","modified_gmt":"2024-11-20T14:39:59","slug":"how-to-change-timezone-on-ubuntu","status":"publish","type":"post","link":"https:\/\/webhostingdelhi.net.in\/tutorials\/how-to-change-timezone-on-ubuntu\/","title":{"rendered":"How to Change TimeZone on Ubuntu ?"},"content":{"rendered":"\n<p>Change TimeZone <a href=\"https:\/\/ubuntu.com\/\" rel=\"nofollow noopener\" target=\"_blank\">on Ubuntu<\/a>, <code>timedatectl<\/code> command is the recommended and most efficient way to manage and modify the timezone on Ubuntu. It provides a straightforward method for viewing and changing system time settings. Below is a step-by-step guide to change TimeZone on <a href=\"https:\/\/ubuntu.com\/server\/docs\/use-timedatectl-and-timesyncd\" rel=\"nofollow noopener\" target=\"_blank\">Ubuntu using <code>timedatectl<\/code><\/a>.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#step-1-open-the-terminal\">Step 1: Open the Terminal<\/a><\/li><li><a href=\"#step-2-check-the-current-timezone\">Step 2: Check the Current Timezone<\/a><\/li><li><a href=\"#step-3-list-available-timezones\">Step 3: List Available Timezones<\/a><\/li><li><a href=\"#step-4-change-time-zone-on-ubuntu\">Step 4: Change TimeZone on Ubuntu<\/a><\/li><li><a href=\"#step-5-verify-the-change\">Step 5: Verify the Change TimeZone on Ubuntu<\/a><\/li><li><a href=\"#step-6-validate-using-the-date-command\">Step 6: Validate Using the date Command<\/a><\/li><li><a href=\"#additional-tips\">Additional Tips<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-open-the-terminal\"><strong>Step 1: Open the Terminal<\/strong><\/h3>\n\n\n\n<p>Open the terminal of your <a href=\"https:\/\/www.webhostingdelhi.net.in\/vps-hosting-delhi\/\" rel=\"nofollow\">Ubuntu server<\/a>. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"535\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2023\/12\/putty.png\" alt=\"putty\" class=\"wp-image-59\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2023\/12\/putty.png 595w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2023\/12\/putty-300x270.png 300w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-check-the-current-timezone\"><strong>Step 2: Check the Current Timezone<\/strong><\/h3>\n\n\n\n<p>Before changing the timezone, it&#8217;s useful to verify the current settings. Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>timedatectl<\/code><\/pre>\n\n\n\n<p>This command will display detailed information about the system&#8217;s current time and timezone. The output includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Local time<\/li>\n\n\n\n<li>Universal time (UTC)<\/li>\n\n\n\n<li>RTC time (hardware clock time)<\/li>\n\n\n\n<li>Current timezone<\/li>\n<\/ul>\n\n\n\n<p>Example output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"156\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-1-1024x156.png\" alt=\"\" class=\"wp-image-788\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-1-1024x156.png 1024w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-1-300x46.png 300w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-1-768x117.png 768w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-1.png 1535w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-list-available-timezones\"><strong>Step 3: List Available Timezones<\/strong><\/h3>\n\n\n\n<p>To find the desired timezone, list all available options using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>timedatectl list-timezones<\/code><\/pre>\n\n\n\n<p>This will output a comprehensive list of timezones, organized by region and city (e.g., <code>Asia\/Kolkata<\/code>, <code>America\/New_York<\/code>, <code>Europe\/London<\/code>). You can scroll through the list or use the search function by pressing <code>\/<\/code> and typing the region or city you\u2019re looking for (e.g., <code>\/Asia<\/code>).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"225\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-2-1024x225.png\" alt=\"Change TimeZone on Ubuntu\" class=\"wp-image-789\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-2-1024x225.png 1024w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-2-300x66.png 300w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-2-768x168.png 768w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-2.png 1450w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-change-time-zone-on-ubuntu\"><strong>Step 4: Change TimeZone on Ubuntu<\/strong><\/h3>\n\n\n\n<p>Once you identify the correct timezone, set it using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo timedatectl set-timezone Region\/City<\/code><\/pre>\n\n\n\n<p>Replace <code>Region\/City<\/code> with the desired timezone. For example<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo timedatectl set-timezone America\/New_York<\/code><\/pre>\n\n\n\n<p>The <code>sudo<\/code> command ensures you have administrative privileges to make system-wide changes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"41\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-3-1024x41.png\" alt=\"\" class=\"wp-image-790\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-3-1024x41.png 1024w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-3-300x12.png 300w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-3-768x31.png 768w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-3-1536x61.png 1536w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-3.png 1551w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-5-verify-the-change\"><strong>Step 5: Verify the Change TimeZone on Ubuntu<\/strong><\/h3>\n\n\n\n<p>After setting the new timezone, confirm the changes by running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>timedatectl<\/code><\/pre>\n\n\n\n<p>The output should reflect the updated timezone. For example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"156\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-4-1024x156.png\" alt=\"\" class=\"wp-image-791\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-4-1024x156.png 1024w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-4-300x46.png 300w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-4-768x117.png 768w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/image-4.png 1529w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-6-validate-using-the-date-command\"><strong>Step 6: Validate Using the <code>date<\/code> Command<\/strong><\/h3>\n\n\n\n<p>To double-check, use the <code>date<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>date<\/code><\/pre>\n\n\n\n<p>This will display the current date and time in the updated timezone.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"additional-tips\">Additional Tips<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Automatic Synchronization:<\/strong> If you want to ensure your system&#8217;s clock is always accurate, verify that NTP (Network Time Protocol) synchronization is active. The <code>timedatectl<\/code> command output includes the status of the NTP service.<\/li>\n\n\n\n<li><strong>Use Cases:<\/strong> This method is particularly useful for servers, where accurate timestamps are critical for logging and scheduling tasks.<\/li>\n\n\n\n<li><strong>Managing Time Zones in Multi-Region Environments<\/strong> : For organizations operating across different time zones, using <code>timedatectl<\/code> makes it easy to switch time zones based on server deployment locations. For example:<\/li>\n\n\n\n<li>A server relocated from the US to Europe can be quickly updated to reflect the new timezone.<\/li>\n\n\n\n<li>Developers working remotely in different regions can standardize time zone settings during collaborative projects.<\/li>\n\n\n\n<li>By aligning the server timezone with its physical or operational location, administrators reduce confusion and errors in time-sensitive applications.<\/li>\n\n\n\n<li><strong>Regular Maintenance for Time Accuracy<\/strong> : Set up periodic checks to ensure time synchronization remains active. This can be part of regular server maintenance routines. For example:<\/li>\n\n\n\n<li>Use monitoring tools like <strong>Nagios<\/strong> or <strong>Zabbix<\/strong> to alert you if NTP synchronization is lost.<\/li>\n\n\n\n<li>Verify the time settings during software updates or server migrations.<\/li>\n\n\n\n<li><strong>Timezone for Desktop Systems<\/strong> :On desktop systems, changing the timezone is useful when:<\/li>\n\n\n\n<li><strong>Traveling:<\/strong> Users can quickly adjust the timezone to match their current location for accurate time display.<\/li>\n\n\n\n<li><strong>Remote Work:<\/strong> Setting the timezone to match a team or client&#8217;s region helps synchronize schedules and meetings<\/li>\n\n\n\n<li><strong>Lightweight and Reliable Command<\/strong> : The <code>timedatectl<\/code> command is lightweight and does not require installing additional software, making it ideal for minimal installations or environments with limited resources. This is especially helpful in:<\/li>\n\n\n\n<li>Embedded Linux systems.<\/li>\n\n\n\n<li>Minimal server installations without GUI tools.<\/li>\n\n\n\n<li><strong>Testing Applications Across Timezones<\/strong> : For developers, using <code>timedatectl<\/code> simplifies testing applications across different time zones. This can help in:<\/li>\n\n\n\n<li><strong>Simulating User Experiences:<\/strong> Mimicking how users in different regions interact with time-sensitive features.<\/li>\n\n\n\n<li><strong>Debugging Issues:<\/strong> Identifying time zone-related bugs in scheduling, logging, or time calculations.<\/li>\n<\/ul>\n\n\n\n<p>By following these steps, you can seamlessly Change TimeZone on Ubuntu using the <code>timedatectl<\/code> command. It\u2019s a reliable, efficient, and modern approach to managing timezone settings. This method works on all recent Ubuntu versions, making it a universal solution for both desktop and server environments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Change TimeZone on Ubuntu, timedatectl command is the recommended and most efficient way to manage and modify the timezone on Ubuntu. It provides a straightforward method for viewing and changing system time settings. Below is a step-by-step guide to change TimeZone on Ubuntu using timedatectl. Step 1: Open the Terminal Open the terminal of your [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":793,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,41,75],"tags":[76],"class_list":["post-787","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ssh","category-linux-command","category-ubuntu","tag-change-timezone-on-ubuntu"],"_links":{"self":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/comments?post=787"}],"version-history":[{"count":2,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/787\/revisions"}],"predecessor-version":[{"id":794,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/787\/revisions\/794"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/media\/793"}],"wp:attachment":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/media?parent=787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/categories?post=787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/tags?post=787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}