Linux根据机器名查询主机的ip

1 查询远程机器的ip

[[email protected] logs]$ nslookup arch036074.sqa.cm4
Server:         10.232.2.254
Address:        10.232.2.254#53

Name:   arch036074.sqa.cm4.tbsite.net
Address: 10.232.36.74

2 查看本机ip

[[email protected] logs]$ hostname -i
10.232.36.88


你可能感兴趣的:(Linux根据机器名查询主机的ip)