1、如下图所示,在终端运行ifconfig命令提示“ifconfig not found "。
2、首先,更新一下软件列表:sudo apt update
3、查询一下软件谱驸扌溺列表中是否有net-tools安装包。此安装包中包含ifconfig命令,如下图所示,软件列表中有net-tools安装包。
4、输入如下命令安装net-tools安装包。sudo apt install net-tools -y
5、dpkg 颍骈城茇-L net-tools |grep ifconfig可以看到ifoncifg命令的安装位置在/sbin/目录下。
6、执行ifconfig命令即可。