Every command is returning 'bash: : c

2020-03-31 07:10发布

I just installed Scala and added the path with gedit ./bashrc:

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

but since then, no command is working:

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

I gave the full path but:

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

Even vi is not working so that I can fix the mess in the path.

[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

<- returned blank line

I tried many steps from different forums but no luck. How can I fix this?

标签: linux shell
1条回答
女痞
2楼-- · 2020-03-31 07:27

Problem is with export PATH=$SCALA_HOME/bin:PATH in this you missed $.

Update default variable as PATH=$SCALA_HOME/bin:$PATH

查看更多
登录 后发表回答