3

After i did change server ~bash_profile for PATH to my Java i cannot use nano or vip anymore.

I actully don't know how to change it back, while i cannot edit it with nano or vi anymore.

What can i do?

 -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 [~]# 
Anders Hedeager
  • 107
  • 2
  • 8

1 Answers1

6

You most likely overrode your path to just java instead of appending to it.

WRONG:

export PATH=/opt/somewhere/java/bin

RIGHT:

export PATH=$PATH:/opt/somewhere/java/bin

to fix this, do

export PATH=/bin:/usr/bin:/usr/local/bin

...and you should have vi and nano back in your path.

Kimvais
  • 38,306
  • 16
  • 108
  • 142