当前位置:网站首页>-bash: ifconfig: command not found

-bash: ifconfig: command not found

2022-07-23 08:00:00 超凡脫俗

使用vmware 最小化安装centos7系统后,进入系统使用ifconfig命令报错“-bash: ifconfig: command not found,”尝试用yum install net-tools 也同样报错:
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run “yum repolist all” to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable
To enable custom repositories:
yum-config-manager --enable

需要进入vim /etc/sysconfig/network-scripts/ifcfg-ens33修改文件,将ONBOOT=no改为yes,并且配置可以上网的IP,重启网络服务即可。
systemctl restart network #重启网络服务

原网站

版权声明
本文为[超凡脫俗]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_39689711/article/details/125901833