Ubuntu

How to Change the Date, Time, and Timezone in Ubuntu 20.04 LTS

Change Date, Time and Time Zone in Ubuntu 20.04

Introduction:

All the modern operating systems that we use today are synchronized with NIST atomic clock. Therefore, we generally do not find any need of changing the date, time, and Timezone of our systems. However, at times it happens that we may mess up these features while performing some system configurations and we may feel the need of manually changing these entities later on. Therefore, today we will try to explore the methods of changing the date, time, and Timezone in Ubuntu 20.04.

Methods of Changing the Date, Time, and Timezone in Ubuntu 20.04:

For changing the date, time, and Timezone in Ubuntu 20.04, you can follow the methods that we have described below. However, before proceeding with these methods, we would first like to take a look at the current date, time, and Timezone of our Ubuntu 20.04 system. These entities can be found out by running the following command:

timedatectl

Our current date, time, and Timezone along with some other information are shown in the image below:

From the image shown above, you can see that the NTP Service is active i.e. your Ubuntu 20.04 system is synchronized with the NIST atomic clock. You need to deactivate this feature or in other words, your system should not be synchronized with the NIST atomic clock if you want to manually change the date, time, and Timezone. For deactivating this feature, you have to run the following command:

timedatectl set-ntp no

If this feature is successfully deactivated, then you will not be able to see any error messages on the terminal as shown in the image below:

Now we can easily proceed with the methods of changing the date, time, and Timezone of our Ubuntu 20.04 system.

Method of Changing the Date in Ubuntu 20.04:

For changing the date in your Ubuntu 20.04 system, you have to run the following command:

timedatectl set-time YYYY-MM-DD

Here, you have to replace YYYY with your desired year such as 2020, MM with your desired month such as 12, and DD with your desired date such as 27.

Once this command is successfully executed, your terminal will start prompting you so that you can run further commands as shown in the image below:

Now we will check whether the date of our Ubuntu 20.04 system has been changed or not by running the “timedatectl” command once again. You can easily see from the following image that our system’s date has been successfully changed.

Method of Changing the Time in Ubuntu 20.04:

For changing the time in your Ubuntu 20.04 system, you have to run the following command:

timedatectl set-time hh-mm-ss

Here, you have to replace hh with your desired hours such as 19, mm with your desired minutes such as 27, and ss with your desired seconds such as 08.

Once this command is successfully executed, your terminal will start prompting you so that you can run further commands as shown in the image below:

Now we will check whether the time of our Ubuntu 20.04 system has been changed or not by running the “timedatectl” command once again. You can easily see from the following image that our system’s time has been successfully changed.

Method of Changing the Timezone in Ubuntu 20.04:

For changing the Timezone in your Ubuntu 20.04 system, you first need to take a look at all the available Time zones in your Ubuntu 20.04 system by running the command shown below:

timedatectl list-timezones

The list of all the available Time zones is shown in the following image:

Out of all these Time zones, you can pick any one of your choice to change your system’s Timezone with as highlighted in the image shown above. Now you can change the Timezone by running the command shown below:

timedatectl set-timezone region/location

Here, you have to replace region and location with the exact name of the region and location of the Timezone that you have selected from the list of the available Time zones such as America and Adak.

Once this command is successfully executed, your terminal will start prompting you so that you can run further commands as shown in the image below:

Now we will check whether the Timezone of our Ubuntu 20.04 system has been changed or not by running the “timedatectl” command once again. You can easily see from the following image that our system’s Timezone has been successfully changed.

Conclusion:

By using all the three methods that we have shared with you today, you can easily change the date, time, and Timezone of your Ubuntu 20.04 system. However, if you have attempted to change these entities just for the sake of demonstration, then it is highly recommended to activate the NTP Service again once you are done so that your system can again synchronize itself with NIST atomic clock. This can be done by running the “timedatectl set-ntp yes” command.

Similar Posts