What ports are used? Find out on Windows10 via command line

2023-10-27 10:03:53
This information is relevant not only for program developers, and not only for enthusiastic players, but also for other users. How to find out information about used ports on Windows 10? This question may arise for those who play video games or develop their own projects.
First you need to check which ports are already open. To do this, you need to run the command prompt as an administrator. In the Windows search (7, 8, 10) you must enter “cmd” in English letters. This is a command line call. If for some reason the search icon is missing, you can use the keyboard shortcut “Win+S”. This will open a window with older queries at the top, preset tabs for programs you might need on the right, and a search line at the bottom. After entering the “cmd” prompt at the command line, you must enter a special command.
- a – all connections and listening ports
- o – output of data about ID process
- n – data about the port (number and address)
To display data on the screen page by page, you need to add one more parameter.
- LISTENING - the port is listening - meaning that other processes can connect to the server on this port
- ESTABLISHED - two-point connection established
- TIME WAIT - response time exceeded
- CLOSE WAIT - connection waiting for closure
To find out which process is occupying the port, you need to slightly change the command by adding one letter to the end. This way the user will see the programs. Which occupy the specified ports.
You can also check the port using special online services.
myopenports.com
2ip.ru/check-port
2ip.ua
test-ip.net