The configuration and time synchronization in Ubuntu , and in any system, is a fundamental part so that some services and processes based on the parameters of the time (hour, minutes or seconds) can work as it should be, therefore a small deconfiguration of these will cause errors that can drive us crazy without knowing the root cause of the error . The time zone setting helps us not to be out of range when we change our geographic location..
Ubuntu has an integrated and active time synchronization by default based on the systemd timesyncd service which replaces the ntpdate and chrony commands as it adds significant improvements to the actions associated with the time.
Let's see how to change the time or time zone in Ubuntu..
Know the current time in Ubuntu
This is easily obtained by executing the command in the terminal:
date
To stay up to date, remember to subscribe to our YouTube channel! SUBSCRIBE
1. How to change the time zone in Ubuntu
Step 1
The first thing we will do is know all the available zones and their syntax, for this we will use the following command:
timedatectl list-timezones
Step 2
To establish a new zone, which will affect the time based on its structure, we execute the following syntax:
timedatectl set-timezone "zone"
Step 3
Then we check the change, which is immediate, with the date command:
2. Manage timesyncd with timedatectl in Ubuntu
On UNIX systems, network time synchronization is governed by the Network Time Protocol or ntpd daemon. This integrates with multiple NTP servers in order to obtain constant time updates for the system. Ubuntu makes use of the timesyncd command instead of ntpd.
Step 1
We execute timedatectl without any parameter and we will get the following:
There we see details such as:
Step 2
In case the line "NTP Service" is in "no", we can activate it with the following command:
sudo timedatectl set-ntp on
This allows NTP to be active in Ubuntu since, as we told you, it allows the time to be synchronized the way it should be in the system.
getFastAnswer has explained the simple process to modify the time zone or adjust the time in Ubuntu..