Ubuntu 22.04にタイムゾーンを設定する方法
環境
OSバージョンの確認
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS"
1.タイムゾーンを「Asia/Tokyo」に変更します
# sudo timedatectl set-timezone 'Asia/Tokyo’
2.タイムゾーンを確認します
# timedatectl status
Local time: 土 2022-04-30 20:42:28 JST
Universal time: 土 2022-04-30 11:42:28 UTC
RTC time: 土 2022-04-30 11:42:28
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
# timedatectl status
Local time: 土 2022-04-30 20:42:28 JST
Universal time: 土 2022-04-30 11:42:28 UTC
RTC time: 土 2022-04-30 11:42:28
Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
# timedatectl status Local time: 土 2022-04-30 20:42:28 JST Universal time: 土 2022-04-30 11:42:28 UTC RTC time: 土 2022-04-30 11:42:28 Time zone: Asia/Tokyo (JST, +0900) System clock synchronized: yes NTP service: active RTC in local TZ: no