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 *:*
Check if a port is in use using terminal netstat command
More Posts related to MacOS,
- Opening mac Terminal
- How to change default macOS Terminal Window size
- How to clear Mac Terminal screen
- Find Hostname of Mac running on macOS Ventura 13
- Installing MongoDB on Linux/Unix/macOS/Ubuntu
- How to switch from bash to zsh shell in macOS Terminal
- Limit scrollback rows in macOS Terminal
- How to Set Background Wallpaper on macOS 13 Ventura
- This operation couldnt be completed. Unable to locate a Java Runtime. [macOS]
- Encode or Decode Base64 String using Mac Terminal Command
- List of All Apple Silicon ARM Based M1/M2 Mac [updated Oct 2022)
- How to remove Siri from Menu Bar [macOS Big Sur]
- Must Know Homebrew Commands for Mac/Linux Users
- Hide Keyboard Text Input Icon on macOS Ventura Menu Bar
- 13.0 MacOS Ventura release date
- How to change the default location of Mac Screenshot
- How to set Out Of Office (OOO) on Outlook for Mac
- 30+ Zoom video communications application shortcuts for macOS
- How to install wget on macOS
- Mac turn dark mode on or off using terminal command
- Create Symbolic Link using Terminal Command
- Mac - How to Install VirtualBox
- How to Enable or Disable Dark Mode on macOS Ventura 13
- How to install homebrew (brew) on M1 Mac
- How to uninstall Microsoft Outlook on Mac
More Posts:
- How to Whitelist IP Address on GoDaddy Hosting? - HowTos
- How to enable disable SharePoint Developer Dashboard for tracing troubleshooting - SharePoint
- Twitch chat down, error loading data, content unavailable, streaming problem - News
- Two Buttons next to each other in Android Layout - Android
- Fix Error CAA50021 - Number of retry attempts exceeds expectation - Microsoft 365 Apps - Microsoft
- Change color of macOS terminal prompt - MacOS
- [Fix] Microsoft AADSTS900561: The endpoint only accepts POST requests. Received a GET request. - Microsoft
- Java JDBC Batch Update Example with PreparedStatement - Java