This article describes how to correctly check the port number occupied by DB2 in Linux or Unix, if you are interested in the actual operation steps for correctly checking the DB2 port number in Linux or Unix, you can click to view the following articles.
Linux, Unix, port Linux, Unix, Port
Assume that you have started the database manager with db2start and configured the communication mode as TCP/IP.
First switch to the db2inst1 user su-db2inst1
Find TCP/IP Service name db2 get dbm cfg | grep-I service
Use the output of the previous command, such as db2c_db2inst1) to find the corresponding port number in the/etc/services file grep db2c_db2inst1/etc/services
This is what you will see from the output of the previous line db2c_db2inst1 50000/tcp
50000 indicates the port number occupied by db2.
The above content describes how to view the port number occupied by DB2 in Linux or Unix, hoping to help you in this regard.