

/etc/hosts에 없으면 /etc/resolv.conf 를 조회한다./etc/resolv.conf/etc/resolv.conf 파일 내용 
/etc/resolv.conf는 systemd-resolved 대몬이 관리한다./lib/systemd/system/systemd-resolved.service/etc/systemd/resolved.conf
/etc/systemd/resolved.conf/etc/systemd/resolved.conf: systemd-resolved을 설정 하는 파일
systemd-resolved는 한번에 여러 DNS에 쿼리를 날린다. /etc/systemd/resolved.conf 설정
1. 설정 진행 전, openresolv와 같이 resolv.conf파일을 수정하는 프로그램을 종료하고 삭제해야 정상적 작동
2. systemd-resolved를 설정하기에 앞서 systemd-resolved가 설치되어 있는지 확인한다.
$ systemctl status systemd-resolved

위와같이 나오지 않고 unit systemd-resolved.service could not be found 뜬다면 설치되어 있지 않은 것이다.
$ sudo systemctl start systemd-resolved
$ sudo systemctl enable systemd-resolved
하지만 아직 /etc/resolv.conf가 여전히 systemd-resolved를 사용하지 않는다.
systemd-resolved는 127.0.0.53 주소에 내부 DNS 서버를 열어두고 이를 통해 도메인 주소 해석과 캐싱을 수행한다.
이 주소를 /etc/resolv.conf에 사용하기 위해서는 직접 /etc/resolve.conf에 nameserver 127.0.0.53 을 추가해도 되지만, run/systemd/resolve/stub-resolv.conf에 설정파일을 만들어 두었기 때문에 이것을 심볼릭 링크로 /etc/resolv.conf를 만들면 된다.

$ sudo rm /etc/resolv.conf
$ sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
systemd-resolve 설정이 끝났다.nolookup 명령어로 시스템이 기본적으로 내부 DNS 서버에 쿼리하는 것을 볼 수 있다.
$ systemd-resolve --status