摘要:本文主要向大家介绍了Linux运维知识之linux -bash: ipconfig: command not found 解决方法,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助。
本文主要向大家介绍了Linux运维知识之linux -bash: ipconfig: command not found 解决方法,通过具体的内容向大家展现,希望对大家学习Linux运维知识有所帮助。
问题: ipconfig: command not found
[root@localhost root]# ipconfig
-bash: ipconfig: command not found
方法:
1、安装好CentOS5.5后,ipconfig找不到那说明没有将ipconfig命令配置到环境变量。 2、测试下结果echo $PATH,果然/sbin这个主要目录不在PATH。
[root@localhost network-scripts]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/ #无/sbin命令路径
3、使用管理员权限 运行vi /etc/profile 在文件末加入以下语句 : PATH=$PATH:/sbin export PATH=$PATH:/sbin 使用:wq!保存并退出。
[root@localhost boot]# vim /etc/profile
。
。
。
。
unset i
unset pathmunge
PATH=$PATH:/sbin
export PATH=$PATH:/sbin
"/etc/profile" 60L, 1071C [root@localhost boot]#:wq
4、输入命令:source /etc/profile,让配置信息立即起效 再输入ifconfig时就可以使用此命令了。
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注系统运维Linux频道!
您输入的评论内容中包含违禁敏感词
我知道了
请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号