Kali Linux ping command abnormal error: Temporary failure in name resolution

Error screenshot:


We can see that the cause of the error is:Temporary failure in name resolution

Checked a lot of information on the Internet, which means there is a problem with DNS resolution

After trying various ways to change files on the Internet, I found that there was no use, so I thought of the method used when configuring the network for CenOS when I learned "Bird's Linux Private Kitchen", and found it works ~

Solution:


1. Right-click the icons of the two small computers in the lower right of the virtual machine, and then click the network option

2. You can see that we are using network address translation NAT (that is, the internal network 192.168. ~. ~ Address is converted to a public network address)

3. We switch the connection method toBridge network card, The default name of the interface below can be selected, click "OK" to save

4. Use ping baidu.comit again and solve it perfectly!

Configuration supplement:


See the online methods are commonly used by vi /etc/resolv.confadding a server or domain name vi /etc/hostscorresponding to the domain name and host name up, so I put these two files for reference.

/etc/hosts

/etc/resolv.conf

In addition, my host does not have a network card, so I use the host to connect the Android phone to the Android phone to share the wifi network, so this should be the key to solving the problem.

Guess you like

Origin www.cnblogs.com/call-me-dasheng/p/12742148.html