[Linux] How to disable the automatic update of the /etc/resolv.conf file (AmazonLinux2)

Introduction

A note on how to disable automatic updates of the /etc/resolv.conf file

Environmental information

Disable automatic updates of the /etc/resolv.conf file

Edit ifcfg configuration file

Configuration file: / etc / sysconfig / network-scripts / ifcfg-eth0

Setting PEERDNS to no prevents the /etc/resolv.conf file from being updated automatically

PEERDNS=no

network service restart

Restart the network service for the settings to take effect

service network restart

reference

I changed /etc/resolv.conf, but for some reason it goes back

Recommended Posts

[Linux] How to disable the automatic update of the /etc/resolv.conf file (AmazonLinux2)
[Linux] How to disable automatic update of /etc/resolv.conf file (Redhat)
How to output the output result of the Linux man command to a file
How to see the contents of the Jupyter notebook ipynb file
How to update the python version of Cloud Shell on GCP
How to check the version of Django
How to manually update the AMP cache
[Linux] How to use the echo command
How to use the Linux grep command
How to update php on Amazon linux 2
How to operate Linux from the console
How to update security on CentOS Linux 8
[Image recognition] How to read the result of automatic annotation with VoTT
How to put a line number at the beginning of a CSV file
How to calculate the volatility of a brand
How to find the area of the Voronoi diagram
How to operate Linux from the outside Procedure
Get the update date of the Python memo file.
How to know the port number of the xinetd service
Template of python script to read the contents of the file
How to visualize the decision tree model of scikit-learn
[Blender] Summary of how to install / update / uninstall add-ons
How to update Spyder
Linux user addition, how to use the useradd command
[Blender] How to dynamically set the selection of EnumProperty
How to limit the API to be published in the C language shared library of Linux
[Python] Summary of how to specify the color of the figure
How to hit the document of Magic Function (Line Magic)
How to access the global variable of the imported module
(Remember quickly) How to use the LINUX command line
[Selenium] How to specify the relative path of chromedriver?
[Linux] [C / C ++] How to get the return address value of a function and the function name of the caller
How to display a specified line of a file or command result on Linux (sed, awk)
A story about porting the code of "Try and understand how Linux works" to Rust
How to increase the processing speed of vertex position acquisition
[Ubuntu] How to delete the entire contents of a directory
How to find the optimal number of clusters in k-means
How to switch the configuration file to be read by Python
How to test the attributes added by add_request_method of pyramid
[Linux] [C / C ++] Summary of how to get pid, ppid, tid
How to calculate the amount of calculation learned from ABC134-D
(Note) How to pass the path of your own module
How to summarize the results of FreeSurfer ~ aparc, aseg, wmparc ~
How to run the Export function of GCP Datastore automatically
How to increase the number of machine learning dataset images
How to find the scaling factor of a biorthogonal wavelet
After all, the story of returning from Linux to Windows
How to create an ISO file (CD image) on Linux
Commands and files to check the version of CentOS Linux
How to connect the contents of a list into a string
How to use the generator
How to update Python Tkinter to 8.6
Automatic update of Python module
[Linux] Update the package offline
How to update with SQLAlchemy?
How to use the decorator
How to increase the axis
How to start the program
How to display a specified column of files in Linux (awk)
[Linux] I tried to summarize the command of resource confirmation system
How to handle multiple versions of CUDA in the same environment