1. window key +R, enter cmd, and press enter.
2. Enter ipconfig
View IP address
netstat
-ano saw the port number.
Remarks: The port is related to the software running on the machine, and different software ports are different. For example, use port 80 when browsing the web. There may be many port numbers on the machine, because you will run many programs.
Second, take linux system as an example to check IP and remote connection ports:
Enter ifconfig to view the IP address during the operation.
Enter the netstat view port.