by Devin Yang
(This article was automatically translated.)

Published - 6 years ago ( Updated - 6 years ago )

In the CentOS system, usually I directly change /etc/resolv.conf,
As a result, when I wanted to change Ubuntu this time, it was indeed written..
"Do not manually change this file, your changes will be overwritten"@@

So Google found it at once. The steps are as follows:

1. Modify the following files:
sudo vim /etc/resolvconf/resolv.conf.d/base
E.g:

nameserver 8.8.8.8
nameserver 168.95.1.1

2. Update sudo resolvconf -u

3. Use cat to view resolv.conf
It will change 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
nameserver 8.8.8.8
nameserver 168.95.1.1

Tags: ubuntu resolv.conf

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


Ubuntu

Suite of ps commands on Ubuntu

Record how to install ps manually if the system is not installed

EBS Volume, mount, ubuntu

Create a ready-to-use Amazon EBS volume

This article completely records the complete process of my formatting and mounting the EBS volume. The text has complete steps and reference links to the original text.