InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Networking tutorials

  • DIG quick start tutorial
  • Dig - list all dns records
  • How to view wifi connection speed on Mac
  • Linux iptables - Nat port forwarding using PREROUTING
  • Linux iptables and ip6tables examples
  • Ngrep - quick start guide
  • Use nc to check if a remote port is reachable
  • Use nc to listen to tcp or udp port
  • Use nc to test HTTP url redirection
  • add more DNS servers to Wi-Fi interface on Mac
  • locally override website host to IP mapping
  • use nc to print headers from browser
 
  • Home
  • > Tutorials
  • > Networking

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

on Sep 23, 2016

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

Suggested posts:

  1. How to connect to mysql server using ssh port forwarding
  2. Use x2go to access remote Ubuntu Linux
  3. Java System.out.format examples
  4. NextJS Quick start tutorial on Mac
  5. Linux what package provides a file
  6. AngularJS format date using date filter
  7. Install google camera on Asus m1 max pro
  8. How to prevent ssh session freezing due to timeout
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Networking, Tutorials, Webmaster
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress