- Log in to the Linux operating system as the root user.
- Run the lsof -i: XXX command. In the command, XXX indicates the port number.The process using the current port is displayed. In the following command output, port 8380 is used by the PID 16779 process.
ivscmc@linux:~> lsof -i:8380 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 16779 ivscmc 152u IPv6 18089709 0t0 TCP *:cruise-update (LISTEN) java 16779 ivscmc 153u IPv6 18089710 0t0 TCP linux:cruise-update->linux:9120 (ESTABLISHED) java 16779 ivscmc 184u IPv6 18089843 0t0 TCP linux:cruise-update->linux:9111 (ESTABLISHED) java 16779 ivscmc 252u IPv6 18090247 0t0 TCP linux:cruise-update->linux:9130 (ESTABLISHED) ivscmc@linux:~> java 16779 ivscmc 153u IPv6 18089710 0t0 TCP linux:cruise-update->linux:9120 (ESTABLISHED