Use netcat (nc) to listen on tcp or udp port

Netcat (nc) can be use as a mini server which can listen to either tcp or udp port on Mac or Linux.

nc – listen on a tcp port

Use sudo in case port is privileged (less than 1024).

$ nc -l 8080

nc – listen on a udp port

Use sudo in case port is privileged (less than 1024).

$ nc -u -l 8080
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments