Useful linux commands that you always forget

what is listening on the given port

lsof -i :8080
netstat -anp | grep 8080

check connectivity of remote host (on given port)

telnet [hostname/IP address] [port number]
nc -z -v [hostname/IP address] [port number]

DNS lookup with dig (Domain Information Groper)

dig google.com