Shell/Bash: ubuntu port ping Example


Shell/Bash Example: This is the "ubuntu port ping" Example. compiled from many sources on the internet by

ubuntu port ping

# 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

* Summary: This "ubuntu port ping" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!