리눅스 timedatectl

Jmnote (토론 | 기여)님의 2018년 12월 3일 (월) 21:52 판 (→‎같이 보기)

1 개요

timedatectl
/usr/bin/timedatectl
[root@zetawiki ~]# timedatectl
      Local time: Mon 2016-11-28 14:45:33 KST
  Universal time: Mon 2016-11-28 05:45:33 UTC
        RTC time: Mon 2016-11-28 14:39:08
       Time zone: Asia/Seoul (KST, +0900)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a
항목 설명
Local time 현재 지역의 시간
Universal time 협정 세계시
RTC time 서버 하드웨어의 시계
Time zone 시간대
NTP enabled NTP 활성화 여부
NTP synchronized NTP로 동기화 되었는지 여부
RTC in local TZ RTC 시계를 시스템 시계와 동일하게 사용할 것인지의 여부
DST active DST(Daylight saving time, 썸머타임) 설정 여부

2 설명

  • 실제 동작은 /etc/localtime의 심볼릭 링크를 변경하는 것이다.
root@ubuntu16:~# timedatectl set-timezone America/New_York
root@ubuntu16:~# ll /etc/localtime
lrwxrwxrwx 1 root root 38 Dec  3 07:50 /etc/localtime -> ../usr/share/zoneinfo/America/New_York
root@ubuntu16:~# timedatectl set-timezone Asia/Seoul
root@ubuntu16:~# ll /etc/localtime
lrwxrwxrwx 1 root root 32 Dec  3 21:50 /etc/localtime -> ../usr/share/zoneinfo/Asia/Seoul

3 실행예시

root@zetawiki:~# timedatectl
      Local time: Mon 2017-06-26 22:22:27 KST
  Universal time: Mon 2017-06-26 13:22:27 UTC
        RTC time: Mon 2017-06-26 13:22:26
       Time zone: Asia/Seoul (KST, +0900)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no
root@zetawiki:~# timedatectl status
      Local time: Mon 2017-06-26 22:22:52 KST
  Universal time: Mon 2017-06-26 13:22:52 UTC
        RTC time: Mon 2017-06-26 13:22:52
       Time zone: Asia/Seoul (KST, +0900)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no
→ timedatectl과 결과가 같음

4 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}