2

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.

2
  • run echo $PATH and see what is in path variable Apr 17, 2012 at 13:24
  • it shows ${PATH}:${VERTX_HOME}
    – Ant's
    Apr 17, 2012 at 14:54

2 Answers 2

1

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

0
0

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.

3
  • 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, 2012 at 14:54
  • Where I can find that file manually?
    – Ant's
    Apr 17, 2012 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, 2012 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .