站长资讯网
最全最丰富的资讯网站

centos 查看ip的方法(图文)

下面由centos入门教程栏目给大家介绍centos 查看ip的方法(图文),希望对需要的朋友有所帮助!

centos 查看ip的方法(图文)

1、现象:

通过ip addr 查找Ip时,发现ens33中没有inet属性,如下图:

centos 查看ip的方法(图文)

2、解决方法

  打开网卡配置文件 /etc/sysconfig/network-scripts/ifcfg-ens33 ,将 ONBOOT 修改为 yes。

vi /etc/sysconfig/network-scripts/ifcfg-ens33

centos 查看ip的方法(图文)

从配置文件看,centos7默认不启动网卡。

修改为 yes ,保存。

centos 查看ip的方法(图文)

重启网络服务:

sudo service network restart

centos 查看ip的方法(图文)

然后查看,即可:

centos 查看ip的方法(图文)

赞(0)
分享到: 更多 (0)