nc command of the most common uses:
1, test TCP port
NC -vz TCP-IP Port
2, test the UDP
NC -uvz IP-UDP Port
. 3, the temporary listening TCP port
NC -l Port
. 4, permanently listening on TCP port
NC -lk Port
. 5, the temporary listening the UDP
NC - Port LU
6, permanent listening UDP
nc -luk Port