Spread the love
How to check if a certain port is occupied on Mac?
CLI:
Open a Terminal window, and use the command below to check if 80 port is occupied.
1 |
sudo lsof -P -i:80 |
Built-in Network Utility Tool
You can also use the Network Utility tool that every Mac comes with.
Just press Command+Spacebar to open the Spotlight Search. Then type the Network Utility to locate the tool. Click the keyboard return/enter key to launch the Network Utility app.
You will find there is a Port Scan tab at the top.mFor example, below I am using the tool to scan all the ports from 0 to 1023, which are also known as “Well-Known Ports”