目录

工欲善其事

实践出真知

活跃标签: linux java mysql 待分类 js springboot win10 电路 vue macOS nginx esp32 windows git docker idea maven esp8266 python Arduino

存档:

X

[ 路由 ] 不同操作系统下获取网管地址

网络作为重要的通讯协议是很复杂的,下面是在不同的操作系统中获取路由器的网管地址的命令

Mac

第一种

cat /etc/resolv.conf

liguanglei@liGuangleideMBP ~ % cat /etc/resolv.conf      
#
# macOS Notice
#
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
#
# To view the DNS configuration used by this system, use:
#   scutil --dns
#
# SEE ALSO
#   dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
nameserver 192.168.199.100
liguanglei@liGuangleideMBP ~ % 

第二种

route -n get default

liguanglei@liGuangleideMBP ~ % route -n get default
   route to: default
destination: default
       mask: default
    gateway: 192.168.199.100
  interface: en7
      flags: <UP,GATEWAY,DONE,STATIC,PRCLONING,GLOBAL>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0 

Windows

ipconfig/all


标题:[ 路由 ] 不同操作系统下获取网管地址
作者:llilei
地址:http://solo.llilei.work/articles/2023/05/13/1683949377319.html