我想ifconfig
用 Python 做解析器和运行器
这个问题的开始,我想使用这样的简单 API。
import ifconfig
ifconfig.interfaces['eth0'].ip = '192.168.0.123' # run subprocess internally
但我不知道所有类似 linux 的操作系统。
所以我选择使用ifconfig
命令。但我也不知道所有类似 linux 的操作系统支持ifconfig
命令。
我可以知道哪些操作系统基本上不支持ifconfig
以及如何使其工作?他们支持相同的用法吗?