Solution to resolve domain names in Linux

Source: Internet
Author: User
Article Title: how to resolve domain names in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In Linux:

Ping www.baidu.com cannot be pinged, but ping 61.135.169.125 can be successful, indicating that the domain name resolution of this machine is faulty.

View/etc/resolv. conf:

Java code

[Root @ host1 ~] # Cat/etc/resolv. conf

Search localdomain

No configuration is available. A free google DNS server 8.8.8.8 can also be used with other:

Java code

[Root @ host1 ~] # Cat/etc/resolv. conf

Search localdomain

[Color = green] servername 8.8.8.8 [/color]

Restart the network:

Ifdown Nic device name (eth0)

Ifup Nic device name (eth0)

Note:

Ifup and ifdown

The ifup command is used to start a specified inactive Nic device. This command is similar to the ifconfig up command. The Ifdown command is used to stop a specified Active Nic device. This command is similar to the ifconfig down command. The two commands are in the following format:

Ifup Nic device name

Ifdown Nic device name

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.