windows xp中如何通过命令获取特定适配器的ip地址
我的系统中有多个适配器,我想知道特定适配器的 IP。在Windows中可以通过命令实现吗,在Linux中很容易吗?或者有其他办法吗?
I have more than one adapter in my system and I want to know the IP of particular adapter. Is it possible through a command in Windows, in Linux it's easy? Or any other way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
以下命令将让您指定一个适配器(ipconfig 似乎不会执行此操作):
您可以添加
| findstr "IP Address"
到该命令的末尾以仅显示 IP 地址行。The following will let you specify an adapter (something ipconfig doesn't appear to do):
You can add
| findstr "IP Address"
to the end of that command to only show the IP address line.以下是我如何获取特定网络适配器的 IP 地址:
有关其工作原理的说明,请参阅此处的相关答案: https://stackoverflow.com/a/59004409/2684661
Here's how I was able to get my IP Address for a specific network adapter:
For an explanation of how this works, see my related answer here: https://stackoverflow.com/a/59004409/2684661
使用 Powershell
识别您的接口并记下 ifIndex,然后运行
获取 IPv4 地址。
With Powershell
Identify your interface and note the ifIndex and then run
To get the IPv4 address.
ipconfig /all 应该可以解决问题。
ipconfig /all should do the trick.