Check Ports With netcat

Probe TCP or UDP ports and pipe data between hosts.

LinuxnetworksocketstcpDiagnosticsLow risk
Run nc -zv example.com 443 to check whether the port accepts a connection.

01Command

Command
$ nc -zv example.com 443

02What it does

netcat is the classic network utility: -z scans without sending data and -v prints the result, while an interactive invocation can transfer files or act as a simple server. The OpenBSD variant is the one packaged by most distributions.

03Risk

RiskLow risk
Requirementssudo apt install netcat-openbsd
!Warning: Only scan hosts you own or are authorized to test; port scanning may violate policy or law.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Debian package: netcat-openbsd
    Debian · vendor-doc · 2026-09-20
    Evidence: Debian packages the OpenBSD netcat, whose nc offers -z for scanning and -v for verbose output.
  • nc(1) manual
    Official project · vendor-doc · 2026-09-20
    Evidence: Debian packages the OpenBSD netcat, whose nc offers -z for scanning and -v for verbose output.

Last verified: 2026-09-22 · Category: Network

06Related solutions