Why I am not able to use `-z` option with nc command in Red Hat Enterprise Linux 7?

Solution Verified - Updated -

Issue

  • Why I am not able to use -z option with nc command which is provided by nmap-ncat package in Red Hat Enterprise Linux 7?
[root@localhost ~]# nc -z -w1 192.168.0.1 80 >/dev/null ;Rc="$?"  ;echo $Rc
nc: invalid option -- 'z'
Ncat: Try `--help' or man(1) ncat for more information, usage options and help. QUITTING.

Environment

  • Red Hat Enterprise Linux 7.0
  • nmap-ncat

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content