netstat -an | grep PORTNUMBER | grep -i listen If the output is empty, the port is not in use. nc -w5 -z -v , you should get something like Connection to 127.0. 0.1 9000 port [tcp/*] succeeded! , otherwise port is closed.