Minimal Centos安装后并没有ifconfig命令

首先,查看ip addr

ip addr

显示如下:

进入下面的目录,然后修改配置文件

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

将ONBOOT=no修改为yes,然后保存,退出。

重新启动网络服务

service network restar

安装net-tools包

yum install net-tools

再查看ifconfig即可看到,分配的地址

如果还是不能运行,则需要更新一下yum,即可

yum upgrade

猜你喜欢

转载自blog.csdn.net/a857553315/article/details/84452516