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,
- How to connect AirPods to Mac
- Display Safari URL address link on hover
- Mac turn dark mode on or off using terminal command
- Docker Desktop needs privileged access macOS
- How to install Java on macOS [Big Sur]
- How to start/boot macOS in safe mode - Big Sur 11.0, Catalina 10.15, or Mojave 10.14
- Find Mac version using terminal command
- How to fix command not found brew (bash, zsh) on macOS Terminal
- How to change default macOS Terminal Window size
- How to make EditText text to uppercase or lowercase on macOS
- Disable Startup Sound on macOS
- How to switch from bash to zsh shell in macOS Terminal
- How to make macOS Terminal window Transparent (or Opaque)
- Remove Now Playing icon from macOS Big Sur Menu Bar
- Test internet speed using macOS Terminal command
- How to change macOS Safari default language
- Encode or Decode Base64 String using Mac Terminal Command
- Safari - Get HTTP Request Response Headers
- How to open terminal on Mac to run commands
- How to install homebrew (brew) on M1 Mac
- How to display directory tree in Mac Terminal
- How to Change Mouse Wheel Scroll Direction on Mac
- MacoOS - xyz is an app downloaded from the internet. Are you sure you want to open it? Alert
- The default interactive shell is now zsh. [macOS]
- Change Terminal Cursor Type in Mac (MacOS Shell)
More Posts:
- How to open terminal on Mac to run commands - MacOS
- Change SharePoint search results FullTextSqlQuery RowLimit 10000 - SharePoint
- Calculate Area of Square - C-Program
- JSON Tutorial: List of Lessons - Json-Tutorial
- How to Subscribe to Google Nest Aware on iPhone - Google
- How to Connect to AWS Windows EC2 UI Instance from M1 Mac (Updated 2022) - HowTos
- How to uninstall GarageBand from Mac - MacOS
- How to hide or cancel Toast message in Android Programming - Android