1、问题:

#ifconfig

bash: ifconfig: command not found

2、原因:非root用户的path中没有/sbin/ifconfig ,其它的命令也可以出现这种情况,解决的方法是一样的。

# whereis ifconfig                  #ifconfig位置
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig..gz
# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/vnc/bin

3、解决方法:

方法一:直接调用

# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr :0C:::E2:
。。。。。。。。。。。。。

方法二:导入路径

# export PATH=$PATH:/sbin
# ifconfig
eth0 Link encap:Ethernet HWaddr :0C:::E2:
。。。。。。。。。。。。。。

方法三:

# vim /etc/profile,找到如下位置,将if注释掉

# Path manipulation
#if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
#fi

bash: ifconfig: command not found解决方法的更多相关文章

  1. 【转载】bash: ifconfig: command not found 解决办法

    原本使用ifconfig 可以使用,今天是怎么了,可能安装软件修改了,百度~~ [oracle@localhost /]$ ifconfig 提示:“bash: ifconfig: command n ...

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

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

  3. bash: sqlplus: command not found 解决方法

    在oracle用户下输入:sqlplus 抛出bash: sqlplus: command not found 解决办法: 在root用户下输入如下命令: ln -s $ORACLE_HOME/bin ...

  4. 【转】bash: ssh: command not found解决方法(linux)

    原文转自:http://www.cnblogs.com/ahauzyy/archive/2013/04/25/3043699.html 今天在搭建hadoop的开发环境中,用的是centsos6.0的 ...

  5. -Bash: Unzip: Command Not Found解决方法 安装unzip

    利用unzip命令解压缩的时候,出现-bash: unzip: command not found的错误. unzip——命令没有找到,其原因肯定是没有安装unzip.利用一句命令就可以解决了. 命令 ...

  6. bash: pip: command not found... 解决方法

    下载安装wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa3 ...

  7. bash: lspci: command not found解决方法

    在CentOS虚拟机使得lspci查看硬件信息.使用时,提示bash: lspci: command not found,大多使用/sbin/lspci即可,我发现我的系统中/sbin下也没有.使用y ...

  8. bash:command not found解决方法

    先用:echo $PATH 查看path是否含有:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin如果没有先用临时环境变量(重启 ...

  9. Linux Oracle bash: “sqlplus / as sysdba”: command not found 解决方法

    bash: sqlplus: command not found 解决方法 注:本文来源于 <   bash: sqlplus: command not found 解决方法   > 1: ...

随机推荐

  1. SVM与LR的区别以及SVM的优缺点

    对于异常数据,SVM比LR更好 SVM的优缺点: 优点:1.提供非常精确的分类器 2.更少的过拟合(因为有L2正则化项0.5||w||2),对噪声数据更加鲁棒(因为损失函数的原因) 缺点:1.SVM是 ...

  2. 【USACO 2.1】Sorting A Three-Valued Sequence

    /* TASK: sort3 LANG: C++ URL: http://train.usaco.org/usacoprob2?a=RkPIMxsFWzm&S=sort3 SOLVE: n个数 ...

  3. iOS 蓝牙开发(四)BabyBluetooth蓝牙库介绍(转)

    转载自:http://www.cocoachina.com/ios/20151106/14072.html 原文作者:刘彦玮 BabyBluetooth 是一个最简单易用的蓝牙库,基于CoreBlue ...

  4. bzoj3926: [Zjoi2015]诸神眷顾的幻想乡

    #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #i ...

  5. Nuget包里的依赖包更新到最新版本会不会随主包回滚到旧包的研究

    A包中有几个依赖包:A-1包,版本:>=1.0:但是我项目上已经引用了A-1包的2.0版本,那么我添加A包的时候,不会将A-1包2.0版本改成1.0版本,会直接用2.0版本的.

  6. hdu 5241 数学题= =

    题意:balabala 题意里给出了好多集合之间的关系,一开始以为要用离散一步一步推什么的... [然而其实并没有什么卵用 对于每一种语言来说,这种语言谁会谁不会是的方案数一定,而且语言之间相互独立的 ...

  7. poj 2528 线段树+离散化

    题意:在墙上贴一堆海报(只看横坐标,可以抽象成一线段),新海报可以覆盖旧海报.求最后能看到多少张海报 sol:线段树成段更新.铺第i张海报的时候更新sg[i].x~sg[i].y这一段为i. 然而坐标 ...

  8. Bzoj2118 墨墨的等式

    Time Limit: 10 Sec  Memory Limit: 259 MBSubmit: 1488  Solved: 578 Description 墨墨突然对等式很感兴趣,他正在研究a1x1+ ...

  9. HTTP Header Injection in Python urllib

    catalogue . Overview . The urllib Bug . Attack Scenarios . 其他场景 . 防护/缓解手段 1. Overview Python's built ...

  10. Google Guava vs Apache Commons for Argument Validation

    It is an established good practice to validate method arguments at the beginning of the method body. ...