This article will guide you on the different methods to modify 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.
To change the time zone in Linux systems use the sudo timedatectl set-timezone command followed by the long name of the time zone you want to set.
To change the hostname in #Linux:
Type the following command to edit /etc/hostname using nano or vi text editor: sudo nano /etc/hostname. Delete the old name and setup new name.
Next Edit the /etc/hosts file: sudo nano /etc/hosts.
Reboot the system to changes take effect: sudo reboot.
#NTP server sync date and time in Linux by:
i. On the Linux machine, log in as root.
ii. Run the ntpdate -u <ntpserver> command to update the machine clock. For example, ntpdate -u ntp-time.
iii. Open the /etc/ntp. conf file and add the NTP servers used in your environment.
iv. Run the service ntpd start command to start the NTP service and implement you configuration changes.