Originally Posted by JimOrJoe
However, after I appended /JDK/bin at the end of the $PATH variable and exported it, the basic shell commands like ls and cd went missing.
is a shell "built-in" and doesn't depend on $PATH. If it stops working, something very
strange is going on. ls
is in /bin
; unless you give the full pathname, the shell requires /bin
to be in $PATH. My guess is you just made a typo. To append:
If at any point you want to review the value of $PATH (say to check for typos):
Adding one or more elements onto the end of $PATH shouldn't cause commands that were working to stop working.