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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.