Test TCP connection without telnet or nc

Sometimes you need to test if a network connection works without actually using the intended client program. Normally you would use a tool like telnet or nc to do this, e.g. $ telnet www.google.com 80 Trying 172.217.20.68… Connected to www.google.com. Escape character is ‘^]’. or $ nc -z -v -w5 www.google.com 80 Connection to www.google.com […]