초짜 스크랩/초짜 IT
emacs 시작속도
구경거리
2010. 12. 2. 01:30
어느날 갑자기 emacs 로딩 속도가 느려지는 경우가 있다.
몇초가 아니라 거의 1분이 넘어간다.
원인은 현재 hostname 이 resovable 하지 않아서 발생하는 문제이다.
호스트 네임을 바꾸었거나, 현재 /etc/resolv.conf 에 설정된 nameserver 로의 접속이 안이루어지거나...
이런 경우,
/etc/hosts 파일을 열어 현재 hostname 이 명시되어 있는지 확인한다.
현재 hostname 은
# hostname 명령어로 확인할 수 있다.
/etc/hosts 파일에 아래와 같이 추가하면 emacs 구동속도가 정상적으로 회복될 것이다.
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
xxx.xxx.xxx.xxx {현재호스트네임}
xxx.xxx.xxx.xxx 는 아이피를 적어주면 되는데,
네트웍이 없을 경우는 로컬 아이피 127.0.0.1 을 적어주면 된다.