the command is:

nc -zv :IP :PORT

nc -zv :HOSTNAME :PORT

hostname is a string as ‘www.google.com’ or ‘abcd’