天天看点

CentOS7中的ifconfig command not found问题

在创建虚拟机的时候,选择最小安装,但是ifconfg无法查询ip地址。

解决方法:

  1. 修改网络配置文件;
vi /etc/sysconfig/network-scripts/ifcfg-ens33
           
  1. 将ONBOOT = no 修改为 yes;
    CentOS7中的ifconfig command not found问题
  2. 重新启动网络;
service network restart
           
  1. yum search ifconfig 得到最后一行信息,表示ifconfig所在的包;
    CentOS7中的ifconfig command not found问题
  2. 使用yum安装ifconfig。
yum install net-tools.x86_64
           

以上即可完成安装