bash: ifconfig: command not found 解决办法
来源:互联网 发布:树莓派zerow ubuntu 编辑:程序博客网 时间:2024/06/05 23:43
bash: ifconfig: command not found 解决办法
原本使用ifconfig 可以使用,今天是怎么了,可能安装软件修改了,百度~~
[oracle@localhost /]$ ifconfig
提示:“bash: ifconfig: command not found”
于是我切换到root用户下
[root@localhost /]$ ifconfig
依然提示:“bash: ifconfig: command not found”
分析问题
1.whereis ifconfig 看一下这个命令在哪个目录下
2.echo $PATH 看一下该目录是否在路经下,注意lunux下是完全区分大小写的,所以不要忽略这点
3.执行命令,需要指定路径或者把目录加入PATH中
4.于是可以这样访问
方法一:[root@localhost sbin]
方法三:修改/etc/profile文件,注释掉if语句即可
把下面的if语句注释掉:
Path manipulation
if [ “$EUID” = “0” ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
修改为
Path manipulation
if [ “$EUID” = “0” ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
注:不光是ifconfig命令出现“bash: ifconfig: command not found”,原因非root用户的path中没有/sbin/ifconfig
,其它的命令也可以出现这种情况,解决的方法是一样的。
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found 解决办法
- bash: ifconfig: command not found
- bash: ifconfig: command not found
- bash: ifconfig: command not found
- AutoMapper官方文档(一)【入门】
- Heatmap.js 学习笔记
- navicat premium 中文破解版 11.18 mac版
- S12X微处理器的XGATE协处理器使用指南
- unity问题汇总
- bash: ifconfig: command not found 解决办法
- Session 与InteractiveSession()区别
- poj日记(1004)
- 机器学习之决策树算法
- 论文阅读学习
- C++获取文件夹下所有文件名
- 设计师面试常遇到的几个问题如何解答
- 取消SecureCRT控制台行数限制
- 十一月二十七日课堂笔记