How to find Oracle home path in Linux: Easy Step-by-step Guide

find oracle home path in Linux

In this article, I will provide a detailed guide on how to find Oracle home path in Linux. We’ll walk you through each step of the process with proper screenshots.

1.First login to the server as the root user and check the inventory location:

[root@node1 ~]# sudo su - oracle
Last login: Sun Mar 31 10:07:36 IST 2024 on pts/0

[oracle@node1 ~]$ cat /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory
inst_group=oinstall

2. Go to the inventory location and check for ContentsXML directory:

[oracle@node1 ~]$ cd /u01/app/oraInventory     ------> Found from 1st Step
[oracle@node1 oraInventory]$ ls -ltr
total 12
-rwxrwx--- 1 grid oinstall 1617 Mar 11 03:35 orainstRoot.sh
-rw-rw---- 1 grid oinstall   56 Mar 11 03:35 oraInst.loc
drwxrwx--- 4 grid oinstall 4096 Mar 11 15:25 logs
drwxrwx--- 4 grid oinstall   64 Mar 11 15:26 backup
drwxrwx--- 2 grid oinstall   81 Mar 11 15:26 ContentsXML

3. Go to the ContentsXML directory and open the inventory.xml file to find oracle home path in linux system:

[oracle@node1 oraInventory]$ cd ContentsXML
[oracle@node1 ContentsXML]$ ls -ltr
total 16
-rw-rw---- 1 grid oinstall 561 Mar 11 15:26 inventory.xml
-rw-rw---- 1 grid oinstall 174 Mar 11 15:26 oui-patch.xml
-rw-rw---- 1 grid oinstall 300 Mar 11 15:30 comps.xml
-rw-rw---- 1 grid oinstall 292 Mar 11 15:30 libs.xml

[oracle@node1 ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2024, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>12.2.0.7.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI19Home1" LOC="/u01/app/19.3.0/grid" TYPE="O" IDX="1" CRS="true"/>
<HOME NAME="OraDB19Home1" LOC="/u01/app/oracle/product/19.3.0/dbhome_1" TYPE="O" IDX="2"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

If you notice the ContentsXML file, You can easily find Oracle home location in Linux. In my case, it is /u01/app/oracle/product/19.3.0/dbhome_1. If you can not find any OraDB19Home, you have not installed the Oracle software yet on your server or VirtualBox. Following my article Oracle Software Installation, you can easily install the Oracle software.

Leave a Reply