替代:
可以用ip a来查看IP
安装
1、查看系统是否有ifconfig命令
[root@localhost ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[root@localhost ~]# ls /sbin |grep ifconfig
[root@localhost ~]#
2、通过yum search 这个命令我们发现ifconfig这个命令是在net-tools.x86_64这个包里,接下来只要安装这个包就行了
[root@localhost ~]# yum search ifconfig
3、yum安装
[root@localhost ~]# yum install -y net-tools.x86_64
4、测试