Operating System/Linux
[경고] unable to resolve host
editor2080
2017. 11. 27. 15:45
* 아래와 같은 경고 발생 시
1 2 | sudo: unable to resolve host user-virtual-machine | cs |
* user-virtual-machine 은 호스트 이름으로 각 환경마다 다를 수 있습니다.
* 발생 원인
: hostname 에 적힌 시스템의 호스트 이름이 /etc/hosts 에 등록이 되어 있지 않기 때문에 발생합니다.
* 조치 사항
1. /etc/hostname 파일의 등록된 호스트 이름을 확인합니다.
1 2 3 | $ cat /etc/hostname user-virtual-machine | cs |
2. /etc/hosts 파일을 편집합니다.
1 2 | $ vi /etc/hosts | cs |
3. hosts 파일의 적절한 위치에 호스트 이름을 아래와 같이 추가합니다.
1 2 | 127.0.0.1 user-virtual-machine | cs |