Answers for "linux ping a port"


ping a port linux

ping ip -p port
Posted by: Guest on April-25-2020

linux ping a port

# Use the below command in your terminal
# No requirments are needed
(echo >/dev/tcp/{host}/{port}) &>/dev/null && echo "open" || echo "close"

# An example below
(echo >/dev/tcp/ &>/dev/null && echo "open" || echo "close"

# if open then it will return "open"
# if closed then it will return "close"
# if you can't connect to it then it will freeze, use ctrl+c
Posted by: Guest on April-28-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language