Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I added these lines to my .bashrc file:

export vertx_home=/anto/vertx/bin
export PATH=${PATH}:${vertx_home}/bin

after doing that. I get an error message like that for all command's I run, for example:clear,groovy :

Command 'clear' is available in '/usr/bin/clear'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
clear: command not found

How to recover from it?

I'm new to Ubuntu. Kindly help.

Thanks in advance.

share|improve this question
    
run echo $PATH and see what is in path variable –  Manula Waidyanatha Apr 17 '12 at 13:24
    
it shows ${PATH}:${VERTX_HOME} –  Ant's Apr 17 '12 at 14:54

2 Answers 2

up vote 0 down vote accepted

Two points:

  1. No need for the first 'export' command
  2. Looks to me you have got your vertx_home set wrong, as your effective path is: /anto/vertex/bin/bin - note the repetition of 'bin'

Suggest changing your .bashrc to read as follows:

vertx_home=/anto/vertx 
export PATH=$PATH:$vertx_home/bin

Close any open terminals for the change to take effect.

share|improve this answer
    
The problem is that I couldn't able to open vi ~/.bashrc as it says the same error in my original question. Not only vi, many other commands got struck-ed! –  Ant's Apr 17 '12 at 14:54
    
Where I can find that file manually? –  Ant's Apr 17 '12 at 14:56
2  
Have you tried using the full path of editor and file? Something like /usr/bin/gedit /home/YOUR_USER_NAME/.bashrc –  Salem Apr 17 '12 at 15:30
    
@Salem: Ya now it works!Thanks.. –  Ant's Apr 17 '12 at 15:39

vi is in
/usr/bin/vi try /usr/bin/vi ~/.bashrc

share|improve this answer
    
Thanks a lot. I recovered! –  Ant's Apr 17 '12 at 15:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.