Terminal Dojo
Help العربية Sign inGet started

Command library / nc

nc

BashDraft — pending expert review2 practice missions

Read and write raw data across a network connection

The network Swiss Army knife: connects to a port like a client (-nv host port), or listens for a connection like a server (-lvp port). Endlessly useful for banner-grabbing, quick port checks, transferring files, and — most famously — catching a reverse shell.

Practice nc

Usage

nc [-l] [-v] [-n] [-p port] [host] [port]
Scope: Only against hosts you own or are explicitly authorised to test. A listening nc port with no authentication is an open door — never leave one running on a real network.

Options and flags

Examples

Common mistakes

nc -lv 4444 nc -lvp 4444

When listening, the port needs -p in front of it — without it nc reads '4444' as a host to connect to, not a port to listen on.

Related commands

nmaphydra