If you want to know if a port is in use or not, you can do that using netstat command on the terminal on your Linux or macOS system,
$ netstat -an
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 127.0.0.1:27015 0.0.0.0:0 LISTENING
TCP 127.0.0.1:27015 127.0.0.1:60040 ESTABLISHED
TCP 192.168.0.109:139 0.0.0.0:0 LISTENING
TCP [::]:135 [::]:0 LISTENING
TCP [::]:445 [::]:0 LISTENING
TCP [::]:49665 [::]:0 LISTENING
TCP [::1]:49709 [::]:0 LISTENING
UDP 0.0.0.0:5050 *:*
UDP 0.0.0.0:5353 *:*
UDP 127.0.0.1:52554 *:*
UDP 127.0.0.1:52555 *:*
UDP [::]:5353 *:*
UDP [::1]:1900 *:*
UDP [::1]:51995 *:*
You will see such a huge list of active commections and port, you can merge grep command to look for the port,
Example: $ netstat -an | grep <port-name>$ netstat -an | grep 5353
UDP 0.0.0.0:5353 *:*
UDP 0.0.0.0:5353 *:*
UDP 192.168.0.108:5353 *:*
UDP [::]:5353 *:*
UDP [::1]:5353 *:*
More Posts related to MacOS,
- How to show line numbers in Nano on Mac
- How to install Jupyter Notebook on macOS Sonoma
- How to Disable Remote Management using Mac Terminal
- Test internet speed using macOS Terminal command
- Docker Desktop needs privileged access macOS
- Google Search Hot Trends Screensaver for Mac OS X
- How to do calculations in Mac Terminal
- How to make TextEdit the default text Editor on Mac
- How to Show Full Website Address on Safari for Mac (Ventura/Sonoma)
- The Zsh Shell - Mac Tutorial
- Opening mac Terminal
- How to change the name of your Mac running on macOS Ventura 13
- How to find the Battery Cycle Count on macOS Ventura
- How to set an emoji as Zsh terminal prompt in macOS
- How to access Trash Folder using Mac Terminal Command
- macOS Ventura XCode Command Line Tools Installation
- Hide Bluetooth icon on Mac Menu Bar macOS Ventura 13
- How to run .sh file in Mac Terminal
- Terminal Command to get the list of available shells in macOS
- How to see Storage Information on macOS Ventura
- How to Go To /usr/local/bin on Mac Terminal?
- How to do screen recording on Mac
- How to Find File and Directory Size in Mac Terminal
- Open .bash_profile File in TextEdit using Terminal
- Remove Now Playing icon from macOS Big Sur Menu Bar
More Posts:
- Find Covid-19 Vaccine centers on macOS or iOS Maps App - News
- Mac: Turn off Auto Capitalization of Words - MacOS
- Python: Pandas Merge With Examples - Python
- jQuery : Move to top of the page - jQuery
- How to check if a Command Exists using Bash Script - Bash
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting - Java
- Program 8: Multiply Two Numbers - 1000+ Python Programs - Python-Programs
- Java Check Leap Year - Programs with Code Examples - Java