How to check if a port is open and you dont have telnet or nc installed

In some environments you might not be able to install telnet or nc to verify if a port is open, but still using standard linux commands you can check if a tcp ports is open or not(timeout 1 bash -c '</dev/tcp/10.4.5.96/8086 && echo PORT OPEN || echo PORT CLOSED') 2>/dev/null

if port 8086 of host 10.4.5.96 is open it will return a PORT OPEN message, else it will return PORT CLOSED.

$ ./buy-me-a-coffee ☕ // found this useful? I write these in my spare time