# ifcon
-bash: ifconfig: command not found
谷歌了一下,整理了一下解决思路

查看ifconfig命令是否存在

查看 /sbin/ifconfig是否存在

如果ifconfig命令存在,查看环境变量设置

#echo $PATH
如果环境变量中没有包含ifconfig命令的路径

临时修改环境变量:在shell中输入

$export PATH = $PATH:/sbin
然后再输入ifconfig命令即可,但是这只是临时更改了shell中的PATH,如果关闭shell,则修改消失,下次还需要重复如上操作

永久修改PATH变量使之包含/sbin路径:

打开/etc/profile文件,在其中输入export PATH=$PATH:/sbin,保存并重启即可,这样一来,PATH路径永久修改成功,以后任何时候只输入ifconfig命令即可

3. 如果ifconfig命令不存在

yum upgrade
yum install net-tools

CentOS 7 ifconfig: command not found的更多相关文章

  1. ifconfig: command not found(CentOS专版,其他的可以参考)

    ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) echo $PATH 解决方案1:先看看是不是 ...

  2. Linux系统ifconfig命令找不到,centos ifconfig Command not found

    centos ifconfig Command not found,Linux系统ifconfig命令找不到 >>>>>>>>>>>& ...

  3. CentOS 7.0下解决ifconfig: command not found的方法

    在CentOS7.0中输入ifconfig命令会遇到-bash: ifconfig: command not found. 在CentOS最小安装时是没有附带ifconfig,我们进入sbin目录下可 ...

  4. ifconfig: command not found(CentOS 7,其他的可以参考)

    ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) 1 echo $PATH 解决方案1:先看看是 ...

  5. CentOS 7.6 最小安装 ifconfig command not found 及 yum 不可用的解决办法

    问题描述 下载的是 CentOS 7.6 Everything 版本,在 VMware 12 上安装时软件选择“最小安装”后,输入 ifconfig 命令提示: bash ifconfig comma ...

  6. ifconfig: command not found 如何解决?

    ifconfig: command not found 查看path配置(echo相当于c中的printf,C#中的Console.WriteLine) 1 echo $PATH 解决方案1:先看看是 ...

  7. ifconfig出现bash: ifconfig:command not found解决办法之解决连环问题

    Centos7中没有安装ifconfig命令的解决方法 在这之前,centos7最小化安装默认是不能联网的,首先必须切换到root用户,再解决网络问题 一.      切换到root用户 二.     ...

  8. CentOS7 下ifconfig command not found解决办法

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

  9. bash: ifconfig: command not found解决方法

    1.问题: #ifconfig bash: ifconfig: command not found 2.原因:非root用户的path中没有/sbin/ifconfig ,其它的命令也可以出现这种情况 ...

随机推荐

  1. Linux内核开发者峰会照的全家福

    刚才看到一张Linux内核开发者峰会照的全家福,有历史价值,给大家分享一下.上面有Torvalds(大致在中间).Andrew Morton(目前的内核主要维护者,第二排右数第二个).Alan Cox ...

  2. centos7 安装python3和pip3

    centos7默认是安装的python2.7以及对于的pip 如果要使用python3并且保留python2请看以下步骤 sudo yum -y install epel-release sudo y ...

  3. Item 33: 避免覆盖(hiding)“通过继承得到的名字”

    莎士比亚有一个关于名字的说法."What's in a name?" 他问道,"A rose by any other name would smell as sweet ...

  4. taglib.jsp

    <%@ taglib prefix="shiro" uri="/WEB-INF/tlds/shiros.tld" %><%@ taglib p ...

  5. C++ Primer笔记2_四种类型转换_异常机制

    1.类型转换 命名的强制类型转换: 有static_cast.dynamic_cast.const_cast.reinterpret_cast static_cast: 编译器隐式运行的不论什么类型转 ...

  6. Lina Group

    var query = from ll in proListRequestList group ll by new {ll.pro_id} into g select new ProListReque ...

  7. vue - check-versions.js for child_process

    webpack之类的配置文件. webpack.base.conf.js

  8. tornado zbar 二维码识别 ,配合nginx 反向代理,supervisord 监控

    tornado zbar 二维码识别 ,配合nginx 反向代理,supervisord 监控 1.zbar识别二维码程序,python2.6.6 #!/usr/bin/env python # co ...

  9. Hibernate关系映射(注解)

    1.类级别注解 @Entity     映射实体类 @Table    映射数句库表 @Entity(name="tableName") - 必须,注解将一个类声明为一个实体bea ...

  10. 11g OCM 考试感悟

    11g OCM 考试感悟 PrudentWoo 累,累.真的很累.考前每天全场景的刷两遍.三遍不觉得累.总感觉练习时间不够.考中尽管时间足够.可是压力很大.尤其看到一些和平时训练不一样题目的时候,那种 ...