用 ipconfig /all 查看完整网络配置

一条命令显示每块网卡的 IP、网关、DHCP、DNS 等全部网络信息。

Windows网络诊断ipconfig 网络配置低风险
运行 `ipconfig /all`,即可打印所有网卡的完整 IP 配置信息。

01命令

命令
$ ipconfig /all

02作用说明

单独运行 ipconfig 只显示最基本的信息,加上 /all 参数后还会显示 DHCP 状态、租约时间、DNS 服务器、MAC 地址和主机名。排查电脑无法上网的问题时,这通常是第一条要运行的命令。也可以用 PowerShell 的 Get-NetIPInterface 和 Get-NetIPAddress 获得同样格式的数据。

03风险

风险低风险

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • Get-NetIPInterface
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Returns IP interface properties such as ConnectionState and Dhcp per address family.
  • netsh
    Microsoft Learn · vendor-doc · 2026-09-17
    依据: Documents netsh WLAN commands including `netsh wlan show profile name=... key=clear` and `netsh wlan delete profile name=...`.

最后验证: 2026-09-18 · 分类: 网络

06相关方案