Connect to one service or exchange one bounded text request.
Usage:
nc -z <IPv4> <port>
nc <IPv4> <port> <text>
-z checks whether the numeric TCP endpoint accepts a connection without
sending an application request. Without -z, quote text containing spaces;
an empty quoted string sends an empty request. Port must be 1-65535.
Requests and responses are limited to 4096 UTF-8 bytes. The service may
impose a smaller limit. Example:
nc -z 10.0.0.10 7000
nc 10.0.0.10 7000 "hello world"
Both network directions must work. A refusal means a reply established the
port was closed. A missing return route times out without revealing whether
a listener exists. Open ports do not identify the service product/version.
Application errors are reported separately from connection failures.
All local users may connect when /bin/nc is executable by them. Loopback
addresses stay on the current computer; 0.0.0.0 is not a destination.
This command performs one immediate request, with no interactive session,
host networking, DNS, port ranges, or background connection.
MERIDIAN DATA SYSTEMS // TERMINAL
nc
No topics match that search.