DevOps

우분투 시간대(timezone) 변경하기

검정비니 2024. 7. 22. 10:14
728x90
반응형

(Ubuntu 22.04 LTS와 24.04 LTS에서 테스트해보았음)

 

현재 설정된 시간대는 timedatectl 명령어를 사용하여 확인할 수 있다.

ubuntu@ubuntu:~$ timedatectl
               Local time: Mon 2024-07-22 01:10:54 UTC
           Universal time: Mon 2024-07-22 01:10:54 UTC
                 RTC time: Mon 2024-07-22 01:10:54
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

현재 Etc/UTC로 설정되어 있다.

 

아래 커멘드와 같이 `dpkg-reconfigure`를 사용하면 timezone을 변경할 수 있게 된다.

sudo dpkg-reconfigure tzdata

 

 

방향키를 사용하여 원하는 지역을 찾은 뒤 Enter키를 누른다.

 

변경할 시간대를 찾아 Enter키를 누르시면 설정이 완료된다.

ubuntu@ip-172-31-14-233:~$ timedatectl
               Local time: Mon 2024-07-22 10:10:54 KST
           Universal time: Mon 2024-07-22 01:10:54 UTC
                 RTC time: Mon 2024-07-22 01:10:54
                Time zone: Asia/Seoul (KST, +0900)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

 

반응형

'DevOps' 카테고리의 다른 글

미디어 업로드 서버의 성능 튜닝 - 디스크 I/O 튜닝  (2) 2023.10.14