IP:
ifconfig

gateway:
[[email protected] ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.44.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
172.16.10.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
172.16.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 172.16.0.254 0.0.0.0 UG 0 0 0 eth0

(以0.0.0.0开始的行的gateway是默认网关)

eg

net: linux查看本机IP、gateway、dns

DNS:
[[email protected] ~]# cat /etc/resolv.conf
search localdomain
nameserver 172.16.0.250

eg

net: linux查看本机IP、gateway、dns

相关文章:

  • 2022-12-23
  • 2021-09-21
  • 2021-12-04
  • 2022-01-01
  • 2021-05-03
  • 2021-12-21
猜你喜欢
  • 2021-09-14
  • 2022-12-23
  • 2022-01-11
  • 2021-11-23
  • 2022-12-23
  • 2021-11-30
相关资源
相似解决方案