LINUX command not found
来源:互联网 发布:汽车维修管理系统源码 编辑:程序博客网 时间:2024/05/01 04:48
这个问题其实很简单,如果你在终端输入一个命令,而系统提示你说命令没有找到(Command not found)的话,要么是因为你没有装相应的软件包,要么就是因为路径设置的问题。如果是因为软件包的问题,那没有别的好说的,安装相应的软件包就好了。而另外一种情况,则需要对用户的路径进行设置。这里针对普通用户和超级用户分开介绍,以Redhat些列为例。 一、普通用户如果一些程序没有安装在系统默认的路径(ie /bin/, /usr/bin, /usr/local/bin/ )里面,这个时候普通用户想要调用这些命令,必须设定路径。方法很简单:以普通用户登录,然后在终端输入:vi ~/.bash_profile会出现如下的内容:# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsexport PATH此时,只要在export PATH前面加入自己的路径即可,例如我的修改后如下:[yyc@localhost bin]$ cat ~/.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:/sbin:/usr/sbin/:/usr/local/programs/crosstool/gcc-4.0.2-glibc-2.3.6/arm-linux-gnu/bin/export PATH二、超级用户这里主要是一些用在系统管理上的命令,例如ifconfig, route等等, 他们位于/sbin, 或/usr/sbin/下。其实这些命令本身就没有任何问题,软件包早已安装完毕,路径设置也没有丝毫问题。而出现Command not found的原因在于:在终端使用su变成超级用户的时候没有将root的路径(环境)一起切换过来,从而导致身份虽然已经是root,但是工作的环境和路径依旧是普通用户的。这种问题的解决方法有两个,其一是按照(一)里面提到的,对普通用户的工作路径进行修改,但是这样比较麻烦。其二则简单的多,只要在使用su的时候在其后家上一个空格和”-“ ,即将su改为 su - 。这样就可以在成为root的同时将root的工作路径也一起切换过来了。如果你已经使用su变成了root, 那也没有关系,只要在输入一下su - 就好了。
- LINUX command not found
- Linux: command not found
- linux command not found问题解决
- Linux:-bash: ***: command not found,
- Linux command not found 解决办法
- Linux:-bash: ***: command not found
- Linux:-bash: ***: command not found
- Linux:-bash: ***: command not found
- Linux ifconfig command not found
- Linux一些command not found
- Linux:-bash: ***: command not found
- linux bash command not found
- linux jps: command not found
- linux ping: command not found
- linux ping: command not found
- Linux问题解决:bash,shutdown command not found
- Linux中"command not found" 解决办法
- arm-linux-ranlib:command not found
- 设计模式 Design Parttern ——外观模式Facade
- Linux常用命令和工具摘要 (持续更新中)
- pRTI中的chat例子的Java版分析
- 难道说这个就是生活吗?
- 关于高端ARM处理器选型的一些个人看法(作者:gooogleman)
- LINUX command not found
- C++编程规范整理(一)
- 解决svn服务端与apache整合安装不正确的问题
- JSTL的小型悲剧事件 感觉自己玩了一次走进科学
- javascript修改struts form的action属性
- [ADO.NET]怎样用DataSet更新数据库
- 安家了 在csdn上
- linux下搭建j2ee开发环境
- DZ及DZX图片上传尺寸BUG