diff --git a/src/assets/image/change-system-locales-in-ubuntu-linux-1696746663971.jpeg b/src/assets/image/change-system-locales-in-ubuntu-linux-1696746663971.jpeg new file mode 100644 index 000000000..69f8cd5ff Binary files /dev/null and b/src/assets/image/change-system-locales-in-ubuntu-linux-1696746663971.jpeg differ diff --git a/src/assets/image/change-system-locales-in-ubuntu-linux-1696746702104.jpeg b/src/assets/image/change-system-locales-in-ubuntu-linux-1696746702104.jpeg new file mode 100644 index 000000000..761893f95 Binary files /dev/null and b/src/assets/image/change-system-locales-in-ubuntu-linux-1696746702104.jpeg differ diff --git a/src/assets/image/change-system-locales-in-ubuntu-linux-1696746775436.jpeg b/src/assets/image/change-system-locales-in-ubuntu-linux-1696746775436.jpeg new file mode 100644 index 000000000..103049310 Binary files /dev/null and b/src/assets/image/change-system-locales-in-ubuntu-linux-1696746775436.jpeg differ diff --git a/src/assets/image/change-system-locales-in-ubuntu-linux-1696746790937.jpeg b/src/assets/image/change-system-locales-in-ubuntu-linux-1696746790937.jpeg new file mode 100644 index 000000000..9378badb7 Binary files /dev/null and b/src/assets/image/change-system-locales-in-ubuntu-linux-1696746790937.jpeg differ diff --git a/src/assets/image/change-system-locales-in-ubuntu-linux-1696747076958.jpeg b/src/assets/image/change-system-locales-in-ubuntu-linux-1696747076958.jpeg new file mode 100644 index 000000000..4688bbf09 Binary files /dev/null and b/src/assets/image/change-system-locales-in-ubuntu-linux-1696747076958.jpeg differ diff --git a/src/assets/image/change-system-locales-in-ubuntu-linux-1696747096422.jpeg b/src/assets/image/change-system-locales-in-ubuntu-linux-1696747096422.jpeg new file mode 100644 index 000000000..acc93ddd9 Binary files /dev/null and b/src/assets/image/change-system-locales-in-ubuntu-linux-1696747096422.jpeg differ diff --git a/src/content/blog/change-system-locales-in-ubuntu-linux.md b/src/content/blog/change-system-locales-in-ubuntu-linux.md new file mode 100644 index 000000000..341ceea5f --- /dev/null +++ b/src/content/blog/change-system-locales-in-ubuntu-linux.md @@ -0,0 +1,85 @@ +--- +title: Ubuntu Linux에서 System Locale 변경하기 +pubDatetime: 2023-10-08T15:25:00Z +featured: false +draft: false +tags: +ogImage: "" +description: Error Message는 영어로만 나오게 할 수 없을까? +--- + +## Table of contents + +## 들어가며 + +Ubuntu Linux의 System Locale을 en_US.UTF-8에서 ko_KR.UTF-8로 변경하려고 한다. (단, LC_MESSAGES만 en_US.UTF-8로 유지할 것이다.) + +### Bash Commands + +```bash +# 한국어 언어 팩 설치 (ko_KR.UTF-8 설치) +sudo apt install -y language-pack-ko +``` + +```bash +# 영어 언어 팩 설치 (en_US.UTF-8 설치) (bash shell에서 에러 메시지는 영어로 볼 거임) +sudo apt-get install -y language-pack-en +``` + +```bash +# locale 확인 +locale + +# LANG=C.UTF-8 +# LANGUAGE= +# LC_CTYPE="C.UTF-8" +# LC_NUMERIC="C.UTF-8" +# LC_TIME="C.UTF-8" +# LC_COLLATE="C.UTF-8" +# LC_MONETARY="C.UTF-8" +# LC_MESSAGES="C.UTF-8" +# LC_PAPER="C.UTF-8" +# LC_NAME="C.UTF-8" +# LC_ADDRESS="C.UTF-8" +# LC_TELEPHONE="C.UTF-8" +# LC_MEASUREMENT="C.UTF-8" +# LC_IDENTIFICATION="C.UTF-8" +# LC_ALL= +``` + +```bash +# locale 변경 +# ko_KR.UTF-8 선택 +sudo dpkg-reconfigure locales +``` + +![](/src/assets/image/change-system-locales-in-ubuntu-linux-1696746663971.jpeg) +![](/src/assets/image/change-system-locales-in-ubuntu-linux-1696746702104.jpeg) +상기 이미지처럼 선택 + +```bash +# powershell 가서 wsl --shutdown으로 WSL 종료하기 +# 그러고 다시 WSL 키고, locale 명령어로 locale 확인 +locale +``` + +![](/src/assets/image/change-system-locales-in-ubuntu-linux-1696746775436.jpeg) +![](/src/assets/image/change-system-locales-in-ubuntu-linux-1696746790937.jpeg) +`locale` 명령어로 system locale이 모두 `ko_KR.UTF-8`로 변한 것을 알 수 있고, `ddd`와 같이 잘못된 명령어를 입력해도, `LC_MESSAGES`가 한글로 나오는 것을 알 수 있다. +그런데 필자는 알파벳으로 `LC_MESSAGES`를 확인하고 싶다. +그래서 `LC_MESSAGES`는 `en_US.UTF-8`로 변경할 것이다. + +```bash +# LC_MESSAGES만 en_US.UTF-8로 변경하기 +# 마지막 줄에 export LC_MESSAGES=en_US.UTF-8 추가 +vim ~/.bashrc +``` + +![](/src/assets/image/change-system-locales-in-ubuntu-linux-1696747076958.jpeg) + +```bash +source ~/.bashrc +``` + +![](/src/assets/image/change-system-locales-in-ubuntu-linux-1696747096422.jpeg) +이제 `LC_MESSAGES`도 알파벳으로 잘 나오는 걸 확인할 수 있다.