본문 바로가기

반응형

localtime

timedatectl 명령어 timedatectl 명령어 timedatectl 명령어는 시스템의 시간 및 날짜 설정을 관리하는데 사용되는 Linux 시스템 명령어입니다. 이 명령어를 사용하면 시스템 시간, 날짜, 시간대 등을 설정하고 확인할 수 있습니다. 일반적으로 timedatectl 명령어를 사용할 때 아래와 같은 옵션을 사용할 수 있습니다. status: 현재 시간 및 날짜 설정 상태를 보여줍니다. set-time YYYY-MM-DD: 시스템 날짜를 지정한 날짜로 설정합니다. set-time HH:MM:SS: 시스템 시간을 지정한 시간으로 설정합니다. set-timezone TIMEZONE: 시스템 시간대를 설정합니다. 예: Asia/Seoul. list-timezones: 사용 가능한 시간대 목록을 표시합니다. timedat.. 더보기
도커 컨테이너 시간 설정(timezone) 도커 컨테이너 시간 설정 docker run docker run -it --rm -v /usr/share/zoneinfo/Asia/Seoul:/etc/localtime:ro centos bash $ docker run -it --rm -v /usr/share/zoneinfo/Asia/Seoul:/etc/localtime:ro centos bash [root@5574276d2005 /]# date Tue Oct 27 16:20:02 KST 2020 docker-compose(volume 마운트) $ cat docker-compose.yml version: '3.2' services: centos: container_name: centos entrypoint: bash -c "while [ 0 ]; do s.. 더보기
[리눅스] localtime 한국(서울)로 변경하기 localtime 한국(서울)로 변경하기 localtime # ls -al /etc/localtime -rw-r--r-- 1 root root 3519 Feb 26 2006 /etc/localtime 한국(서울) localtime 으로 변경하기 # ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime # ls -al /etc/localtime lrwxrwxrwx 1 root root 30 May 15 01:02 /etc/localtime -> /usr/share/zoneinfo/Asia/Seoul 시간 동기화 rdate -s time.bora.net && clock -w 더보기

728x90
반응형