I have oracle Database 12c in a virtual machine with the database working normally in a linux environment (Centos).

Through windows, using ssh I was able to connect to the linux virtual machine. But when I try to connect the database using 'sqlplus' command, I get the following error. bash: sqlplus: command not found... output after run comand 'sqlplus'

  • What's your question, exactly? Did you check if the Oracle environment variables are sourced in the oracle user profile?
    – mustaccio
    Commented Jan 24, 2023 at 13:09

1 Answer 1


The sqlplus executable will be installed in the bin/ subdirectory under the Oracle Home directory for the database you're working with. Setting up the Environment Variables on the database server is usually done using the oraenv shell script.
The trick, of course, is that this, too, is installed in the bin/ subdirectory of an Oracle Home directory!

Your .bashrc or .bash_profile should, at the very least, set the ORACLE_SID and PATH Environment Variables and, if you want, make a call to oraenv to set up the rest.

export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1

export PATH=${PATH}:${ORACLE_HOME}/bin

# Use db1
export ORACLE_SID=db1
. oraenv

See Database Administrator's Reference

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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