-bash: ifconfig: command not found 错误解决方法

linux 系统可能没有自带 ifconfig 工具。当用到 ifconfig 如果没有安装就会出现 --bash: ifconfig: command not found,需要我们自己安装。

CentOS 安装

yum install net-tools -y

Ubuntu 安装

apt install net-tools -y