ifconfig命令无法找到,提示bash: ifconfig: command not found 转自于青竹居士
来源:互联网 发布:淘宝 实体店 知乎 编辑:程序博客网 时间:2024/06/11 04:51
问题就是题目那样,具体解决方法截图如下:
分析问题
1.whereis ifconfig 看一下这个命令在哪个目录下
2.echo $PATH 看一下该目录是否在路经下,注意lunux下是完全区分大小写的,所以不要忽略这点
3.执行命令,需要指定路径或者把目录加入PATH中
4.于是可以这样访问
方法一:[root@localhost sbin]$ /sbin/ifconfig 就可以出现使用了
方法二:[root@localhost sbin]$ export PATH=$PATH:/sbin ,这样设置后,下次就可以直接访问了,免处第一种的麻烦,如:
[root@localhost /]$ ifconfig
方法三:修改/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
方法二操作实例:
在终端或纯文本界面下,打开用户主目录下的.bash_pro
#cd ~ 进入用户目录,否则找不到文件.bash_profile
#ls -a
#vi .bash_pro
在PATH那行后面加上/sbin,用冒号分割,如
PATH=$PATH:$HOME/bin:/sbin
保存退出后,
source .bash_profile
或重新注销、登录,就可以生效了。
- ifconfig命令无法找到,提示bash: ifconfig: command not found 转自于青竹居士
- ifconfig命令无法找到,提示bash: ifconfig: command not found
- Linux 提示:“bash: ifconfig: command not found”
- linux 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
- man ifconfig时提示:-bash: man: command not found
- CentOS7执行ifconfig Command not found 未找到命令
- CentOS7执行ifconfig Command not found 未找到命令
- 【Linux】Linux下输入ifconfig提示bash: ifconfig: command not found解决办法
- 删除iscsi上的存储
- 遍历过程怎么对List数组进行增、删、改、查?
- Replica Placement(副本放在位置)
- Android Studio关联源码?
- Intellij IDEA 将工程转换成maven工程 详解
- ifconfig命令无法找到,提示bash: ifconfig: command not found 转自于青竹居士
- 项目迁移 windows到linux
- 2007年分区联赛提高组之一 统计数字
- Java面试宝典
- Notes of Go
- BZOJ3875: [Ahoi2014]骑士游戏
- 对于指定的描述符打印文件标志
- Win10上编译Caffe之Libcaffe,运行mnist案例
- IntelliJ IDEA 快捷键