我不知道为什么会发生这种情况,但是当我从终端输入命令时,例如gedit ~/.bashrc
出现以下错误:
Command 'gedit' is available in the following places
* /bin/gedit
* /usr/bin/gedit
The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable.
gedit: command not found
这也发生在 cat、shutdown 命令等等上。我该如何解决?
答案1
:$PATH
我忘了在行尾添加~/.bashrc
。添加它解决了我的问题。在编辑之前,它就像export PATH="/storage/IntelFPGA/q18.1/quartus/bin"
。