DB2 10.5 for Linux, UNIX, and Windows

db2ls - List installed DB2 products and features command

Lists the DB2® products and features installed on your Linux and UNIX systems, including the DB2 HTML documentation.

With the ability to install multiple copies of DB2 products on your system and the flexibility to install DB2 products and features in the path of your choice, you can use the db2ls command to list:
  • where DB2 products are installed on your system and list the DB2 product level.
  • all or specific DB2 products and features in a particular installation path.

The db2ls command can be found both in the installation media and in a DB2 install copy on the system. The db2ls command can be run from either location. The db2ls command can be run from the installation media for all products except IBM® Data Server Driver Package.

Authorization

None

Required Connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-db2ls-------------------------------------------------------->

>--+-----------------------------------------------------------+-->
   '- -q--+--------------------------+-- -b--base-install-path-'   
          +- -f--feature-rsp-file-ID-+                             
          +- -a----------------------+                             
          '- -p----------------------'                             

>--+-----+--+---------------+----------------------------------><
   '- -c-'  '- -l--log-file-'   

Command parameters

-q
Signifies that the query is to list installed DB2 products and features. By default, only the visible components (features) are displayed unless the -a parameter is also specified.
-f feature-rsp-file-ID
Queries for the specific feature, if it is installed. If it is not installed, the return code from the program is nonzero, otherwise the return code is zero.
-a
Lists all hidden components as well as visible features. The db2ls command only lists visible features by default.
-p
Lists products only. This will give a brief list of which products the customer has installed rather than listing the features.
-b base-install-path
When using the global db2ls command in /usr/local/bin, you need to specify which directory you are querying. The global db2ls command will simply call the db2ls from that install path and pass in the rest of the parameters.
-c
Prints the output as a colon-separated list of entries rather than column-based. This allows you to programmatically with this information. The first line of output will be a colon-separated list of tokens to describe each entry. This first line will start with a hash character ("#") to make it easy to ignore programmatically.
-l log-file
Trace log file to use for debugging purposes.

Examples

Usage notes