Edited bashrc in RHEL5 results in command not found for user

Solution Verified - Updated -


  • problem with PATH in bash:
# /bin/echo $PATH 
  • expected results:

    # /bin/echo $PATH
  • ran the following commands to update the environment variables:

    # cd /root.  
    # echo JAVA_HOME=/usr/java/jre1.5.0_18 >> .bashrc
    # echo PATH=/usr/java/jre1.5.0_18/bin:$PATH >> .bashrc
    # echo export JAVA_HOME PATH >> .bashrc.
  • now nothing is working for commands:

    # ls
    -bash: ls: command not found 


  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content