$ netstat -at Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:ssh *:* LISTEN tcp 0 0 localhost:ipp *:* LISTEN tcp 0 0 localhost:smtp *:* LISTEN tcp 0 256 192.168.0.6:ssh 192.168.0.32:53550 ESTABLISHED tcp6 0 0 [::]:http [::]:* LISTEN tcp6 0 0 [::]:ssh [::]:* LISTEN tcp6 0 0 ip6-localhost:ipp [::]:* LISTEN tcp6 0 0 ip6-localhost:smtp [::]:* LISTEN
host 命令
host 命令就像 nslookup 一样,用来查询远程系统的 IP 地址,但是还提供系统的邮箱处理地址。
$ host world.std.com world.std.com has address 192.74.137.5 world.std.com mail is handled by 10 smtp.theworld.com.
nslookup 命令
nslookup 还提供系统中(本例中是本地系统)提供 DNS 查询服务的信息。
$ nslookup world.std.com Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer: Name: world.std.com Address: 192.74.137.5