On supported Linux® and UNIX® operating systems, the db2ls command lists the DB2® database products and features installed on your system, including the DB2 Version 9.7 HTML documentation.
Before you begin
At least one DB2 Version 9 (or later) database product must already be installed by a root user for a symbolic link to the db2ls command to be available in the /usr/local/bin directory.
About this task
With the ability to install multiple copies of DB2 database products on your system and the flexibility to install DB2 database products and features in the path of your choice, you need a tool to help you keep track of what is installed and where it is installed. On supported Linux and UNIX operating systems, the db2ls command lists the DB2 products and features installed on your system, including the DB2 HTML documentation.
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.
The db2ls command can be used to list:
Restrictions
The output that the db2ls command lists is different depending on the ID used:
The db2ls command is the only method to query a DB2 database product. You cannot query DB2 database products using Linux or UNIX operating system native utilities, such as pkginfo, rpm, SMIT, or swlist. Any existing scripts containing a native installation utility that you use to query and interface with DB2 installations must change.
You cannot use the db2ls command on Windows® operating systems.
Procedure
db2lsThe command lists the following information for each DB2 database product installed on your system:
db2ls -q -p -b baseInstallDirectory
where:
Results
Depending on the parameters provided, the command lists the following information: