Application example of host command in Linux

a command syntax

Function: Find out the IP of a hostname

host hostname [server]

[server]: Use the DNS server IP not defined by the /etc/resolv.conf file to query the IP of a host.

 

Two application examples

The first method is to use the DNS server defined in resolv.conf to find out the IP of the Baidu host.

The second method is to use Google's DNS (8.8.8.8) to check the IP of the Baidu host.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326418380&siteId=291194637