1

I need to add java to my PATH on one of my Linux servers, to do this I edited the bashrc and added,

PATH=/usr/local/jdk1.6.0/bin
export PATH

Since then I have not been able to use simple bash commands like ls nano locate cp is there any way I can fix this? The OS of the server is CentOS 5 with Plesk 9 (64-bit), can anyone help me recover basic functionality in my terminal?

1
  • you cant export and define at the same time export PATH=... Commented Jun 24, 2010 at 9:41

1 Answer 1

6

You have to add the java path to your PATH variable, not set PATH to only include the java path

PATH=$PATH:/usr/local/jdk1.6.0/bin
export PATH
Sign up to request clarification or add additional context in comments.

3 Comments

ah right, how can I now edit my bashrc without use of nano, pico, vi, vim or similar?
Sorted it with a bit of SFTP and exporting the bashrc. Many thanks nos
you could use the full path /usr/bin/nano ... Most application are in /bin /usr/bin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.