티스토리 뷰
timedatectl 사용법에 대해 설명합니다.
timezone 변경하기
timedatectl list-timezones로 timezone이름을 찾고,
timedatectl set-timezone명령으로 timezone을 변경합니다.
[root@bastion ~]# timedatectl
Local time: Mon 2020-06-08 02:08:54 CDT
Universal time: Mon 2020-06-08 07:08:54 UTC
RTC time: Mon 2020-06-08 07:08:54
Time zone: America/Chicago (CDT, -0500)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2020-03-08 01:59:59 CST
Sun 2020-03-08 03:00:00 CDT
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2020-11-01 01:59:59 CDT
Sun 2020-11-01 01:00:00 CST
[root@bastion ~]# timedatectl list-timezones | grep Seoul
Asia/Seoul
[root@bastion ~]# timedatectl set-timezone Asia/Seoul
[root@bastion ~]# timedatectl
Local time: Mon 2020-06-08 16:10:28 KST
Universal time: Mon 2020-06-08 07:10:28 UTC
RTC time: Mon 2020-06-08 07:10:28
Time zone: Asia/Seoul (KST, +0900)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
아래와 같이 timezone에 맞게 시간이 나옵니다.
[root@bastion ~]# journalctl -f
-- Logs begin at Wed 2020-06-03 14:00:06 KST. --
Jun 08 16:12:55 bastion.ibm.cloud sshd[3189]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Jun 08 16:12:57 bastion.ibm.cloud sshd[3189]: Failed password for root from 37.49.226.181 port 47724 ssh2
Jun 08 16:12:57 bastion.ibm.cloud sshd[3189]: Re
시간 변경하기 : set-time, set-ntp
ntp는 Network Time Protocol의 약자로 자동으로 시간을 맞춰주는 서비스입니다.
[root@bastion ~]# timedatectl
Local time: Mon 2020-06-08 16:15:20 KST
Universal time: Mon 2020-06-08 07:15:20 UTC
RTC time: Mon 2020-06-08 07:15:20
Time zone: Asia/Seoul (KST, +0900)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
[root@bastion ~]# timedatectl set-time 11:00:00
Failed to set time: Automatic time synchronization is enabled
[root@bastion ~]# timedatectl set-ntp false
timedatectl set-ntp false
[root@bastion ~]# timedatectl
timedatectl
Local time: Mon 2020-06-08 16:15:49 KST
Universal time: Mon 2020-06-08 07:15:49 UTC
RTC time: Mon 2020-06-08 07:15:49
Time zone: Asia/Seoul (KST, +0900)
NTP enabled: no
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
[root@bastion ~]# timedatectl set-time 11:00:00
[root@bastion ~]# timedatectl
Local time: Mon 2020-06-08 11:00:08 KST
Universal time: Mon 2020-06-08 02:00:08 UTC
RTC time: Mon 2020-06-08 02:00:08
Time zone: Asia/Seoul (KST, +0900)
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
'Infrastructure > OS' 카테고리의 다른 글
Red Hat System Administration I: 네트워크 관리 (0) | 2020.06.08 |
---|---|
Red Hat System Administration I: Logs (0) | 2020.06.08 |
Red Hat System Administration I: ssh 사용하기 (0) | 2020.06.04 |
Red Hat System Administration I: Service와 Daemon 관리 (0) | 2020.06.04 |
Red Hat System Administration I: Linux processes (0) | 2020.06.04 |
댓글
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- 애자일
- 디토소비
- agile
- AXON
- 마이크로서비스 패턴
- 도파밍
- spotify
- 마이크로서비스
- micro service
- 스핀프로젝트
- 호모프롬프트
- API Composition
- 버라이어티가격
- 분초사회
- 육각형인간
- 스포티파이
- SAGA
- CQRS
- 리퀴드폴리탄
- 돌봄경제
- Event Sourcing
- 요즘남편 없던아빠
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
글 보관함