"리눅스 timedatectl"의 두 판 사이의 차이

잔글 (봇: Jmnote의 2020-03-04T16:55:15Z 에 작성한 568444 판으로 되돌림)
잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
4번째 줄: 4번째 줄:
;/usr/bin/timedatectl
;/usr/bin/timedatectl


<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# timedatectl
[root@zetawiki ~]# timedatectl
       Local time: Mon 2016-11-28 14:45:33 KST
       Local time: Mon 2016-11-28 14:45:33 KST
14번째 줄: 14번째 줄:
  RTC in local TZ: no
  RTC in local TZ: no
       DST active: n/a
       DST active: n/a
</source>
</syntaxhighlight>
{| class='wikitable'
{| class='wikitable'
! 항목 !! 설명
! 항목 !! 설명
37번째 줄: 37번째 줄:
==설명==
==설명==
* 실제 동작은 [[/etc/localtime]]의 심볼릭 링크를 변경하는 것이다.
* 실제 동작은 [[/etc/localtime]]의 심볼릭 링크를 변경하는 것이다.
<source lang='console'>
<syntaxhighlight lang='console'>
root@ubuntu16:~# timedatectl set-timezone America/New_York
root@ubuntu16:~# timedatectl set-timezone America/New_York
root@ubuntu16:~# ll /etc/localtime
root@ubuntu16:~# ll /etc/localtime
lrwxrwxrwx 1 root root 38 Dec  3 07:50 /etc/localtime -> ../usr/share/zoneinfo/America/New_York
lrwxrwxrwx 1 root root 38 Dec  3 07:50 /etc/localtime -> ../usr/share/zoneinfo/America/New_York
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
root@ubuntu16:~# timedatectl set-timezone Asia/Seoul
root@ubuntu16:~# timedatectl set-timezone Asia/Seoul
root@ubuntu16:~# ll /etc/localtime
root@ubuntu16:~# ll /etc/localtime
lrwxrwxrwx 1 root root 32 Dec  3 21:50 /etc/localtime -> ../usr/share/zoneinfo/Asia/Seoul
lrwxrwxrwx 1 root root 32 Dec  3 21:50 /etc/localtime -> ../usr/share/zoneinfo/Asia/Seoul
</source>
</syntaxhighlight>


==실행예시==
==실행예시==
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# timedatectl
root@zetawiki:~# timedatectl
       Local time: Mon 2017-06-26 22:22:27 KST
       Local time: Mon 2017-06-26 22:22:27 KST
58번째 줄: 58번째 줄:
NTP synchronized: no
NTP synchronized: no
  RTC in local TZ: no
  RTC in local TZ: no
</source>
</syntaxhighlight>
<source lang='console'>
<syntaxhighlight lang='console'>
root@zetawiki:~# timedatectl status
root@zetawiki:~# timedatectl status
       Local time: Mon 2017-06-26 22:22:52 KST
       Local time: Mon 2017-06-26 22:22:52 KST
68번째 줄: 68번째 줄:
NTP synchronized: no
NTP synchronized: no
  RTC in local TZ: no
  RTC in local TZ: no
</source>
</syntaxhighlight>
:→ timedatectl과 결과가 같음
:→ timedatectl과 결과가 같음



2020년 11월 2일 (월) 00:56 기준 최신판

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 }}