Edited bashrc in RHEL5 results in command not found for user

Solution Verified - Updated -

Issue

  • problem with PATH in bash:
# /bin/echo $PATH 
/usr/java/jre1.5.0_18/bin:PATH:/root/bin 
  • expected results:

    # /bin/echo $PATH
     /usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
    
  • 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 
    

Environment

  • Red Hat Enterprise Linux 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.