Linux

nc

SafePort checks & raw sockets

nc -zv <host> <port>

-zv tests a single port; -l listens. The lightweight standard for connectivity checks.

Examples

  • nc -zv db01 5432Test DB port
  • nc -l 8080Listen on a port

Syntax

nc [-zv] [-l] <host> <port>

Before you run it

Close listeners when done.

Related commands

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store