mini install centOS log

no ifconfig

yum install net-tools

------------------------------------------------------------------------

http://blog.163.com/aaron_yuan/blog/static/16519523220148215950996/

CentOS 7中没有ifconfig命令,而且不能发现eth0  

2014-09-02 14:31:45|  分类: Linux |  标签:centos  ifconfig  eth0  网卡更名  |举报|字号 订阅

 
 
1、由于安装时使用的是最小化安装CentOS 7,安装完成后没有发现ifconfig命令
      检查/sbin下也没有这个命令。使用的是root身份。
      #yum install -y net-tools*
     可以成功安装ifconfig
 
 2、我的网卡是Atheros AR8131 PCI-E,但是安装过程中没有提示设置网卡,安装好后也没有发现ifcfg-eth0的          配置文件。
 
      使用dmesg | grep -in eth检查开机信息中有没有eth0的消息
 
      发现由interface eth0改为了ens33
3、更改网卡的名字 -  由ens33改为eth0
 
    修改grub中的GRUB_CMDLINE_LINUX,追加语句"net.ifnames=0 biosdevname=0“。//注意位置
    然后执行# grub2-mkconfig -o /boot/grub2/grub.cfg
    之后重启# reboot
 
  再查看网卡,发现名字已经更改过来了。
 CentOS 7中没有ifconfig命令,而且不能发现eth0 - Aaron - 飄緲峰主人
 但是仍需要将/etc/sysconfig/network-scripts/ifcfg-ens33更名为ifcfg-eth0,同时修改其内容,指定IP、NETMASK及GATEWAY,同时修改onboot=no为yes。最后执行service restart network。
原文地址:https://www.cnblogs.com/eiguleo/p/4076514.html