Linux 101: Set Up the correct Time on Ubuntu Server
Having the correct date and time in your server is essential, it could lead to incomplete updates for example. Therefore now you are going to set up correctly your date and hour on your Ubuntu Server.
#This is the starting point of our VM with Ubuntu Server 20.04.3 LTS
#You must change the user on root before you proceed with these commands
apt-get update -y
date
timedatectl
#Now we should verify that the Time Synchronization is active
systemctl status systemd-timesyncd.service
#AS in our case the Local time is not correct, we must find our our timezone and update it with the correct command as showed below:
systemctl status systemd-timesyncd.service
#Now we need to try to find out which one is our timezone
timedatectl list-timezones
In our case was simple, due to the fact that was enough to select the continent and the city. Therefore for us it is Europe/Berlin
timedatectl set-timezone Europe/Berlin
timedatectl list-timezones
Comments