How to configure DNS under Linux system? You certainly don't know these!

  Linux may be a very simple and easy-to-learn operating system for many people, but Linux involves a lot of knowledge. Today I want to introduce to you how Linux configures DNS.

  How to modify DNS in Linux system?

  1. Enter the "vi /etc/resolv.conf" command in the command line to edit the resolv file

  2. Enter nameserver 114.114.114.114 in the opened file (press the I key on the keyboard to make the current text enter the editing state), and press ESC on the keyboard to exit the editing state.

  3. In the exit editing state, enter: wq and press Enter to save the current configuration

  How to configure DNS in network card mode?

  Enter "vi /etc/sysconfig/network-scripts" on the command line to open the network card configuration file, and configure the new DNS in DNS1 and DNS2 in the configuration file.


Guess you like

Origin blog.51cto.com/15052541/2677256