Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

nc

Network utility (Swiss Army knife)

Syntax

nc [OPTION]... HOST PORT

Common Options

-lListen mode
-pSpecify local port
-vVerbose mode
-zZero I/O mode (scan)
-wSet timeout
-uUse UDP
-nNo DNS resolution
-eExecute command

Common Examples

nc -zv host 80

Check if port is open

nc -l 1234

Listen on port 1234

nc host 1234

Connect to port 1234

nc -zv host 20-80

Scan port range

nc -u -l 1234

UDP listen

echo "GET /" | nc host 80

Send HTTP request

Related Commands

Related Tools

More Code & Dev Tools