Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 tried installing sqlplus by following the instruction from here. I'm still getting :

sqlplus: command not found

when I do sqlplus from my terminal.

I'm an novice in Ubuntu and I use Ubuntu 12.04.

share|improve this question
I think you need to run the alien -i commands with sudo: sudo alien -i – medigeek Jul 5 '12 at 12:01

First of all you need to download Instant Client Downloads. Install alien software so you can install rpm packages by typing following command in terminal.

sudo apt-get install alien

Once that is done, go to the folder where the rpm files are located and execute the following:

sudo alien -i oracle-instantclient*-basic*.rpm
sudo alien -i oracle-instantclient*-sqlplus*.rpm
sudo alien -i oracle-instantclient*-devel*.rpm

You need to install Type following command to do it:

sudo apt-get install libaio1

Create Oracle configuration file:

sudo sensible-editor /etc/

Put this line in that file:

/usr/lib/oracle/<your version>/client/lib/ 

Note - for 64-bit installations, the path will be:

/usr/lib/oracle/<your version>/client64/lib/ 

Update the configuration by running following command:

sudo ldconfig

Try to connect using:

sqlplus username/password@//dbhost:1521/SID


sqlplus testuser/password

Note that if you installed the 64-bit version, the client is called sqlplus64.

share|improve this answer
Thanks for the details. It helped me get the installation completed, especially the part about installing the lib. – lonstar Feb 7 '13 at 23:04
...until I tried to run sqlplus testuser/password and got "sqlplus: error while loading shared libraries: cannot open shared object file: No such file or directory" – lonstar Feb 7 '13 at 23:08
...and it was because I just touched the oracle.conf file and it turns out you need to add this to it: /usr/lib/oracle/11.2/client/lib/ (make sure to check that you actually have that path, and thanks to…). Once I did that, all was well. – lonstar Feb 7 '13 at 23:13
@K .K Patel I followed your instructions but after typing sqlplus in command line, it prompts to enter a username and password. And i do not know the username and password. What should i do? – Sabyasachi Aug 30 '14 at 8:30

I think this link would help. It is pretty descriptive. Make sure you follow all the steps. Still if you have any problems, don't hesitate to comment.

share|improve this answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Eliah Kagan Jul 5 '12 at 12:17
That what even I have done.. But it doesn't seem to be working.! – Ant's Jul 5 '12 at 12:41
I found this thread if this would help you any better. I don't have the net speed to download it, else i would have tried it myself and give a better solution. – Vinit Kumar Jul 5 '12 at 14:38
@Ant's "it's not working" does not provide us with clues. Show us the output of each command. Then we'll have a general picture of what's going on and where the problem is. – medigeek Jul 5 '12 at 22:12

Of course the correct installation is from official packages like above (download Instant Client Downloads), but you can get a full working sqlplus just by copying these files (you can found it in any computer with oracle client installed), and some msb are optitional:


As aditional dependency, I did include - it can be installed with sudo apt-get install libaio1

So, a sample use can be:

ORACLE_HOME=$PWD LD_LIBRARY_PATH=$PWD/lib ./sqlplus/sqlplus user/pw@server:PORT/
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.