$ yum install net-tools
Fedora:
$ sudo dnf install net-tools
Debian, Ubuntu:
$ sudo apt install net-tools
Install the netcat Using the fllowing command:
$ yum install nc [On CentOS/RHEL]
$ dnf install nc [On Fedora 22+ and RHEL 8]
$ sudo apt-get install Netcat [On Debian/Ubuntu]
NetCat commands:
$ nc -v -w 2 z 192.168.56.1 22 #scan a single port
OR
$ nc -v -w 2 z 192.168.56.1 22 80 #scan multiple ports
OR
$ nc -v -w 2 z 192.168.56.1 20-25 #scan range of ports
Step-1: Install/(Upgrade to Ubunto 22) Ubuntu on your Windows sudo apt update && sudo apt full-upgrade -y sudo do-release-upgrade ...