Ubuntu 터미널 에서 한글 깨질때
IT,PC,모바일,스마트폰 정보와 팁 그리고 제품리뷰와 생활정보
Ubuntu 터미널 에서 한글 깨질때
ubuntu 기본 터미널에서 한글이 깨져서 보니까 locale 에 한글에 없네요...
아무래도 한글버전으로 설치 안아서 생기는 문제 인거 같습니다.
root@ubuntu:~# locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
es_CO.utf8
POSIX
zh_CN.utf8
zh_SG.utf8
그래서 아래 command 로 추가를 해줍니다..
root@ubuntu:~# sudo apt-get install localepurge
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
debfoster deborphan bleachbit
The following NEW packages will be installed:
localepurge
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 32.6 kB of archives.
After this operation, 172 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/universe localepurge all 0.6.2+nmu2 [32.6 kB]
Fetched 32.6 kB in 1s (17.4 kB/s)
Preconfiguring packages ...
Selecting previously deselected package localepurge.
(Reading database ... 178557 files and directories currently installed.)
Unpacking localepurge (from .../localepurge_0.6.2+nmu2_all.deb) ...
Processing triggers for man-db ...
Setting up localepurge (0.6.2+nmu2) ...
그러면 Text 로 된 메뉴화면이 뜨는데 거기서 EUCKR 을 선택 하시면 됩니다.
그리고 아래으 두 커맨드를 더 치시면 됩니다.
root@ubuntu:~# locale-gen --purge
Generating locales...
en_AG.UTF-8... done
en_AU.UTF-8... done
en_BW.UTF-8... done
en_CA.UTF-8... done
en_DK.UTF-8... done
en_GB.UTF-8... done
en_HK.UTF-8... done
en_IE.UTF-8... done
en_IN.UTF-8... done
en_NG.UTF-8... done
en_NZ.UTF-8... done
en_PH.UTF-8... done
en_SG.UTF-8... done
en_US.UTF-8... done
en_ZA.UTF-8... done
en_ZM.UTF-8... done
en_ZW.UTF-8... done
ko_KR.EUC-KR... done
ko_KR.UTF-8... done
Generation complete.
root@ubuntu:~# dpkg-reconfigure locales
Generating locales...
en_AG.UTF-8... up-to-date
en_AU.UTF-8... up-to-date
en_BW.UTF-8... up-to-date
en_CA.UTF-8... up-to-date
en_DK.UTF-8... up-to-date
en_GB.UTF-8... up-to-date
en_HK.UTF-8... up-to-date
en_IE.UTF-8... up-to-date
en_IN.UTF-8... up-to-date
en_NG.UTF-8... up-to-date
en_NZ.UTF-8... up-to-date
en_PH.UTF-8... up-to-date
en_SG.UTF-8... up-to-date
en_US.UTF-8... up-to-date
en_ZA.UTF-8... up-to-date
en_ZM.UTF-8... up-to-date
en_ZW.UTF-8... up-to-date
ko_KR.EUC-KR... up-to-date
ko_KR.UTF-8... up-to-date
Generation complete.
그런다음에... 아래 처럼 /etc/environment 에 추가를 해줍니다.
root@ubuntu:~# cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANG="ko_KR.UTF-8"
/etc/profile, {HOME}/.bashrc or .profile 등 각 계정별로 추가 해줘도 됩니다.