我尝试将 INTEL PARALLEL COMPOSER 包含到我的 .bashrc 中。但是出了点问题。现在我无法使用 gedit 或 vi 编辑器。
milenko@milenko-HP-Compaq-6830s:~$ gedit .bashrc
Command 'gedit' is available in '/usr/bin/gedit'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
gedit: command not found
milenko@milenko-HP-Compaq-6830s:~$ vi .bashrc
Command 'vi' is available in '/usr/bin/vi'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
vi: command not found
如何从终端编辑 .bashrc?
答案1
你似乎搞乱了你的 $PATH,它决定了 bash 在哪里寻找程序。通常,用户程序驻留在 /usr/bin 中,您应该能够使用它们的完整路径运行,而不仅仅是名称:/usr/bin/nano .bashrc
或/usr/bin/vi .bashrc
。
或者您可以export PATH=/usr/bin
按照 Jeff 在评论中的建议运行 。