在虚拟机中以最小化方式安装centos7,后无法上网,因为centos7默认网卡未激活。 
而且在sbin目录中没有ifconfig文件,这是因为centos7已经不使用 ifconfig命令了,已经用ip命令代替; 
解决ifconfig不可用:ip addr 即查看分配网卡情况。 
激活网卡:在文件 /etc/sysconfig/network-scripts/ifcfg-ens33 中 
进入编辑模式,将 ONBOOT=no 改为 ONBOOT=yes,就OK

保存后重启网卡: service network restart (这步一定不要忘)
此时就可以上网了。(如果不知怎样判断能否上网,ping 一下网址就可以,就是这么简单,例如命令:ping www.baidu.com)

这样yum,wget等等都可以用啦

解决Centos7不能联网且ifconfig出现command not found的更多相关文章

  1. 解决 CentOS7 安装完成后ifconfig命令不能用

    今天用VMWare安装了CentOS7,选择了最小安装包模式,安装完毕之后想查看一下本机的ip地址,发现报错 # ifconfig -bash: ifconfig: command not found ...

  2. centos7: ifconfig出现command not found解决办法

    问题 说下我linux配置情况,不一样的可以选择借鉴我的办法. 在虚拟机中以最小化方式安装centos7,ifconfig命令无效,而且在sbin目录中没有ifconfig文件. 原因 这是因为cen ...

  3. 解决centos7中ens33中不显示IP等问题

    在虚拟机中安装centos7,输入ifconfig显示command not found.在sbin目录中发现没有ifconfig文件,这是因为centos7已经不使用 ifconfig命令了,已经用 ...

  4. 解决centos7下 selenium报错--unknown error: DevToolsActivePort file doesn't exist

    解决centos7下 selenium报错--unknown error: DevToolsActivePort file doesn't exist 早上在linux下用selenium启动Chro ...

  5. gedit 没有preference项,使preference回归,并用命令行设置行号,解决centos7下中文乱码,text wrapping等问题

    1. 最简单的,使preference选项回来: gsettings set org.gnome.settings-daemon.plugins.xsettings overrides '@a{sv} ...

  6. 解决centos7 开机/etc/rc.local 不执行的问题

    最近发现centos7 的/etc/rc.local不会开机执行,于是认真看了下/etc/rc.local文件内容的就发现了问题的原因了 ? 1 2 3 4 5 6 7 8 9 10 11 #!/bi ...

  7. 解决Centos7 下 root账号 远程连接FTP,vsftpd 提示 530 Login incorrect 问题

    原文:解决Centos7 下 root账号 远程连接FTP,vsftpd 提示 530 Login incorrect 问题 三步走: 1.vim /etc/vsftpd/user_list 注释掉 ...

  8. centos7 编译问题:aclocal-1.14: command not found

    centos7 编译问题:aclocal-1.14: command not found https://blog.csdn.net/vr7jj/article/details/80438663

  9. ubuntu无法找到ifconfig(command not found: ifconfig)

    演示环境 $ uname -a Linux xxxxx-xxxxx-xxxx5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x8 ...

随机推荐

  1. py-day1-4 python基本数据类型2

    # replace 替换 text = 'xiaomafafafahaoyunlianlian' v = text.replace('fa','shun') x = text.replace('fa' ...

  2. 阿里云 持续集成环境自动部署cordova项目热更新脚本

    linux脚本: #!/bin/sh rm -rf /home/tomcat/xiecang_hybird_web/xiecang_hybird_web.zip rm -rf /home/tomcat ...

  3. ML: 聚类算法R包-K中心点聚类

    K-medodis与K-means比较相似,但是K-medoids和K-means是有区别的,不一样的地方在于中心点的选取,在K-means中,我们将中心点取为当前cluster中所有数据点的平均值, ...

  4. TCP/UDP端口列表(WIKIpedia)

    计算机之间依照互联网传输层TCP/IP协议不同的协议通信,都有不同的对应端口.所以,利用短信(datagram)的UDP,所采用的端口号码不一定和采用TCP的端口号码一样.以下为两种通信协议的端口列表 ...

  5. 一个OpenGL小程序

    发个没什么技术含量的文,最近准备通过opengl的学习来好好c++,于是找了网上的教程来搭建opengl的编写环境,建了个空项目,又找了个案例稍微改了改运行了下,还成,ok了~喜不自禁~ 贴个图: 代 ...

  6. Modbus RTU 协议使用汇总

    原创地址:https://blog.csdn.net/u012166958/article/details/64920144 标准的Modbus 口是使用RS-232C 兼容串行接口,它定义了连接口的 ...

  7. IntelliJ IDEA Configuring projects

    https://www.jetbrains.com/help/idea/configuring-projects.html Configuring projects A project in Inte ...

  8. 同台同时多开DELPHI2007的解决办法

    Cannot create file "C:\Users\Administrator\AppData\Local\Temp\EditorLineEnds.ttr"这个问题的产生根据 ...

  9. C++11--Tuple类<tuple>

    #include "stdafx.h" #include <iomanip> #include <condition_variable> #include ...

  10. 修改OBS为仅直播音频

    准备工作: 1. VS2013 的最新更新版或者VS2015 2. QT Creater 5.7   https://www.qt.io/ 3.  CMake (cmake-gui) 4. obs 依 ...