Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running Ubuntu 12.04.2 LTS and am having problems with getting a command to execute. I have set up the variable in /etc/environment which looks like this:

JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=128m -"

The issue is with the $ORACLE_HOME in the PATH variable. I can cd to the correct directory using:


But when I try to run sqlplus (the program I am having problems with), the system can't find it. And before anyone asks, yes I have rebooted the system and the file sqlplus does exist in $ORACLE_HOME/bin and is executable by everyone.

This should work, but obviously isn't. Any ideas as to what the issue might be? It is like it doesn't exist in the path although it is clearly there. I can't figure this out. Please help!


share|improve this question

migrated from Mar 21 '13 at 7:58

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

The Ubuntu docs say that the environment file isn't a script file, so it may not be interpreting your $ORACLE_HOME variable the way you hope. Run env to see what your path looks like. If it isn't what you expect, try hard coding the full path in /etc/environment and see if that helps.

share|improve this answer
Hard coding the path worked! Thanks. I thought you could put in variable names into the path as I have seen numerous how to manuals that say to do that. – user5013 Mar 21 '13 at 15:55
If you edit your ~/.profile instead of your etc/environment, then you can use variables. However, the path will only be set for your user. If this answer helped you, please consider accepting it. – kjw0188 Mar 21 '13 at 17:35

There are two probable reasons:
1) $PATH isn't set
2) There's conflicting sqlplus earlier in the PATH.

To make sure path is set, run echo $PATH from console. It should print /usr/lib/oracle/11.2/client64 among other paths.

Also I recommend to put $ORACLE_HOME:$ORACLE_HOME/bin before other paths.

If nothing works, make sure sqlplus is directly runnable:
cd /usr/lib/oracle/11.2/client64
Maybe it's a script pointing to non-existent shell?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.