每个命令都返回&#39; bash:<command />:command not found ...&#39;

时间:2017-06-05 07:32:32

标签: linux shell

我刚刚安装了Scala并添加了gedit ./bashrc的路径:

export SCALA_HOME=/home/avijit/scala-2.12.2
export PATH=$SCALA_HOME/bin:PATH

但从那时起,没有命令正在运行:

[avijit@localhost-localdomain ~]$ ls
bash: ls: command not found...

我给出了完整的路径,但是:

[avijit@localhost-localdomain ~]$ /home/avijit/.bashrc
bash: /home/avijit/.bashrc: Permission denied

即使是vi也没有工作,所以我可以修复路径中的混乱。

[avijit@localhost-localdomain ~]$ vi /home/avijit/.bashrc
bash: vim: command not found...
[avijit@localhost-localdomain ~]$ sudo /home/avijit/.bashrc
bash: sudo: command not found...
[avijit@localhost-localdomain ~]$ echo $path

&lt; - 返回空行

我尝试了不同论坛的许多步骤,但没有运气。我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

问题在于export PATH=$SCALA_HOME/bin:PATH,你错过了$

将默认变量更新为PATH=$SCALA_HOME/bin:$PATH