1. Ubuntu 재부팅시 resolv.conf 초기화 될때
페이지 정보
작성자 관리자 댓글 0건 조회 1,636회 작성일 21-02-08 08:40본문
1. Ubuntu 재부팅시 resolv.conf 초기화 될때
우분투에서 /etc/resolv.conf를 수정해 dns를 이용하는데, 재부팅 할때마다 자꾸 resolv.conf 파일이 초기화된다.
다음 파일을 수정하여 dns를 추가하면 된다.
root@sinks:~# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
root@sinks:~# vi /etc/resolvconf/resolv.conf.d/head
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 168.126.63.1
서비스를 다시 시작한다.
root@sinks:~# service resolvconf restart
root@sinks:~# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 168.126.63.1
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
댓글목록
등록된 댓글이 없습니다.