【问题标题】:Why “ifconfig” docker command responds "bash: ifconfig: command not found" on Windows?为什么“ifconfig” docker 命令在 Windows 上响应“bash: ifconfig: command not found”?
【发布时间】:2019-06-06 04:28:14
【问题描述】:

我在我的 Windows PC 上安装了 docker。

我打开控制台并输入docker ps。该命令正常工作。接下来我尝试执行命令 if config 但没有找到:

$ ifconfig
bash: ifconfig: command not found

是因为 Windows 吗?

附言

命令docker network ls 也可以正常工作

【问题讨论】:

标签: windows docker networking ifconfig


【解决方案1】:

查找当前的 TCP/IP 网络配置值与 docker 无关,这些应用程序随您的操作系统提供。

  • 适用于 Windows ipconfig -> wiki
  • for mac ifconfig -> wiki
  • 对于linux使用ip相关命令ex: 获取ip地址ip addr show

注意:在 linux 中 ifconfig 可能有效,但已弃用。

更多关于ifconfig vs ip的信息你可以在blog阅读

【讨论】:

  • 你的操作系统是什么?
  • OpenMediaVault(基于 Debian)在 VBox 上。好像我的 docker-container 没有附带这些工具。
猜你喜欢
  • 2021-01-28
  • 1970-01-01
  • 2017-02-20
  • 2013-08-01
  • 1970-01-01
  • 2019-07-07
  • 2014-09-10
  • 2021-06-22
  • 1970-01-01
相关资源
最近更新 更多