Created
April 12, 2022 01:02
-
-
Save haeramkeem/283d3ab1a29874c810166a942a8ffb26 to your computer and use it in GitHub Desktop.
netstat examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if given port is in use | |
netstat -an | grep ${PORT} | |
# Check all TCP listening port and its process name | |
netstat -nlpt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment