在我将PATH的服务器~bash_profile更改为我的Java后,我再也无法使用nano或vip了。
我实际上不知道如何改回来,而我不能用nano或vi编辑它。
我该怎么办?
-bash: ano: command not found
root@s [~]# nano
-bash: nano: command not found
root@s [~]# pacstrap -i /mnt base base-devel
-bash: pacstrap: command not found
root@s [~]# nano /etc/timezon
-bash: nano: command not found
root@s [~]# nano /etc/timezone
-bash: nano: command not found
root@s [~]# vi
-bash: vi: command not found
root@s [~]# vi
-bash: vi: command not found
root@s [~]# nano ~/.bash_profile
-bash: nano: command not found
root@s [~]# vi ~/.bash_profile
-bash: vi: command not found
root@s [~]#
答案 0 :(得分:5)
你最有可能将你的路径改为java而不是附加到它。
<强> WRONG 强>:
export PATH=/opt/somewhere/java/bin
从右强>:
export PATH=$PATH:/opt/somewhere/java/bin
要解决此问题,请执行
export PATH=/bin:/usr/bin:/usr/local/bin
...你应该让vi和nano回到你的道路上。