Easy Tutorial
❮ Linux Comm Paste Linux Comm Diff ❯

Linux nc Command

Linux Command Manual

The Linux nc command is used to set up routers.

This command allows you to configure the relevant parameters of routers.

Syntax

nc [-hlnruz][-g<gateway...>][-G&lt;pointer count>][-i&lt;delay seconds>][-o&lt;output file>][-p&lt;communication port>][-s&lt;source address>][-v...][-w&lt;timeout seconds>][hostname][communication port...]

Parameter Description:

Examples

TCP Port Scan

# nc -v -z -w2 192.168.0.3 1-100 
192.168.0.3: inverse host lookup failed: Unknown host
(UNKNOWN) [192.168.0.3] 80 (http) open
(UNKNOWN) [192.168.0.3] 23 (telnet) open
(UNKNOWN) [192.168.0.3] 22 (ssh) open

Scan ports 1-100 on 192.168.0.3

UDP Port Scan

# nc -u -z -w2 192.168.0.1 1-1000 //Scan ports 1-1000 on 192.168.0.3

Scan Specific Port

# nc -nvv 192.168.0.1 80 //Scan port 80
(UNKNOWN) [192.168.0.1] 80 (?) open
y  //User input

Linux Command Manual

❮ Linux Comm Paste Linux Comm Diff ❯