Linux 타임존 변경

리눅스 시간은 /etc/localtime 설정 파일의 내용에 따른다. 원래 설치 시 타임존을 설정하는데, 가끔 제대로 안된 경우가 있다. 한국 시간으로 변경하고자 하면 /etc/localtime 경로의 설정파일들을 한국시간 설정으로 변경하면 된다.

다음과 같이 하면 된다.

/etc/share/zoneinfo 있는 설정파일의 심링크를 만들어주면 된다.

sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
date
Thu Feb  2 17:28:51 KST 2023