This comprehensive Linux guide expects that you run the following commands as root user but if you decide to run the commands as a different user then ensure that the user has
sudoaccess and that you precede each of the privileged commands withsudo
A time zone is nothing but a region of the globe that observes a uniform standard time for constitutional, business and cultural purposes. Using the correct timezone is important for many systems related tasks and processes. Sometimes we forgot to set timezone properly for newly installed system or sometimes we need to change timezone of systems for various testing.
Before changing the timezone of your system, you should first check the current timezone of your system.
To check the current timezone of your system, you can run the following command in your terminal
root@codesposts:~$ timedatectl
Local time: Wed 2019-07-24 22:43:42 UTC
Universal time: Wed 2019-07-24 22:43:42 UTC
RTC time: Wed 2019-07-24 22:43:42
Time zone: Etc/UTC (UTC, +0000)
NTP enabled: no
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a To display the list of available timezones, run the following command
[root@codesposts ~]# timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
....
..
America/Dawson
America/Dawson_Creek
America/Denver
America/Detroit
America/Dominica
America/Edmonton
America/Eirunepe
America/El_Salvador
America/Fortaleza
America/Glace_Bay
....
..
Pacific/Saipan
Pacific/Tahiti
Pacific/Tarawa
Pacific/Tongatapu
Pacific/Wake
Pacific/Wallis If you want to display the list of timezone for specific region, you can use the following command
[root@codesposts ~]# timedatectl list-timezones | grep Asia This command will display all the Asian timezones
To change your current timezone in ubuntu 18.04 LTS, you can run the following command
root@codesposts:~$ unlink /etc/localtime Then run the following command
root@codesposts:~$ ln -s /usr/share/zoneinfo/[Zone/TimeZone] /etc/localtime You can check the current timezone again to verify the new timezone
[root@codesposts ~]# timedatectl list-timezones If you are using any older version of Ubuntu (16.04 or older), you can follow the steps below
Before changing the timezone of your system, you should first check the current timezone of your system.
[root@codesposts ~]# date
Wed July 24 17:52:58 EST 2019 Follow the commands below to change the timezone
root@codesposts:~$ mv /etc/localtime /etc/localtime.old Then run this command
root@codesposts:~$ ln -s /usr/share/zoneinfo/America/New_York /etc/localtime Change “America/New_York” with your desired timezone.
You can check the current timezone again to verify the new timezone
[root@codesposts ~]# date The post How To Set Or Change The Timezone On Ubuntu appeared first on CODESPOSTS.COM.
Go to Source
Author: staff
Previously I have written about how useful public cloud storage can be when starting a…
This is Part 2 of the "Karafka to Async Journey" series. Part 1 covered WaterDrop's…
For many software teams, documentation is written after features are built and design decisions have…
With the release of the FIPS 140-3 certified cryptographic modules for Ubuntu 22.04 LTS, Canonical…
Open source libraries are repositories of code that developers can use and, depending on the…
Last year, we had the opportunity to speak at Regent’s UX Conference (Regent’s University London’s…