Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Amruta Pardeshi
Amruta Pardeshi

Posted on

     

Change the timezone on ubuntu linux server

First check which timezone the server is using
>>ls -l /etc/localtime
lrwxrwxrwx 1 root root 27 Sep 2 07:09 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC

>>timedatectl
Local time: Thu 2022-10-13 12:18:02 UTC
Universal time: Thu 2022-10-13 12:18:02 UTC
RTC time: Thu 2022-10-13 12:18:03

Time zone: Etc/UTC (UTC, +0000)

System clock synchronized: yes

NTP service: active

RTC in local TZ: no

Find out which time zone you have to set.
This command will give you list of timezones

>>timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre

Now set the timezone
>>sudo timedatectl set-timezone Asia/Kolkata

Now check if it is set correctly
>>timedatectl
Local time: Thu 2022-10-13 17:51:00 IST
Universal time: Thu 2022-10-13 12:21:00 UTC
RTC time: Thu 2022-10-13 12:21:01

Time zone: Asia/Kolkata (IST, +0530)

System clock synchronized: yes

NTP service: active

RTC in local TZ: no

Doneee ...

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

AWS Community Builder. DevOps Engineer with 3+ years of hands-on experience supporting, automating and deployments in AWS. Proficient in developing CICD pipelines using Jenkins.
  • Location
    Pune, Maharashtra
  • Education
    E&tc Engineering
  • Work
    DevOps Engineer
  • Joined

More fromAmruta Pardeshi

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp