How to Install Netcat on Windows Using Ncat

To install Netcat on Windows, download Nmap's official installer, select Ncat, then check the command in a new PowerShell window.

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered to your inbox.

To install Netcat on Windows, download the official Nmap installer, select Ncat (Modern Netcat reincarnation) and Register Nmap Path, then complete installation. Open a new PowerShell or Command Prompt window and run ncat --help to display its help.

This native Windows installation works on Windows 10 and Windows 11. Its executable is named ncat.exe, so use ncat for this installation. You can also install Netcat inside Cygwin, MSYS2 or Ubuntu on WSL.

The short version

  • Start with the installer: The official Nmap Windows download includes Ncat.
  • Keep the command accessible: Select Register Nmap Path during installation and open a new terminal afterward.
  • Use the right name: The Nmap installation provides ncat.exe, not nc.exe.
  • Match your environment: Run Cygwin, MSYS2 and Ubuntu Netcat commands inside their respective terminals.

Installation optionWhat you needWhere to run it
Nmap graphical installerOfficial Windows installerPowerShell or Command Prompt
Ncat aloneNmap installer with component switchesPowerShell or Command Prompt
Scoop Nmap packageScoop already installedPowerShell
Chocolatey Nmap packageChocolatey and an elevated terminalWindows terminal
Cygwin Netcat packageCygwin installerCygwin terminal
MSYS2 GNU Netcat packageUpdated x86_64 MSYS2 environmentMSYS2 terminal
Ubuntu OpenBSD Netcat packageUbuntu 24.04 LTS on WSLUbuntu terminal

Download the official Windows installer

Open the official Nmap download page and find Microsoft Windows binaries. Download the latest stable self-installer, listed as nmap-7.993-setup.exe. Ncat is included in this distribution.

Select Ncat and complete installation

Run the downloaded installer and proceed through its license page. The installer requests administrator privileges. In component selection, select Ncat (Modern Netcat reincarnation) and Register Nmap Path, then choose the installation directory and complete installation.

Open a new PowerShell or Command Prompt window after the installer finishes. Reopening the terminal picks up the installer's PATH registration, which lets you invoke Ncat by name. Enter the following command to display its help:

ncat --help

If Ncat displays its help, the command is accessible from that terminal. Keep using ncat for this installation because its executable is ncat.exe. The nc commands used by Cygwin, MSYS2 and Ubuntu belong to those separate installations.

Install Ncat without the other Nmap components

To install Ncat while excluding the other named components, launch the same installer with component-selection switches. From Command Prompt in the download directory, enter:

nmap-7.993-setup.exe /NMAP=NO /NPCAP=NO /NPING=NO /ZENMAP=NO /NDIFF=NO /REGISTRYMODS=NO

Complete the interactive installer after running the command. These switches retain Ncat and PATH registration while excluding the specified components. After installation, open a new terminal and display Ncat's help:

ncat --help

Fix an unrecognized Ncat command

Close the terminal you had open during installation and open a new one. That lets the terminal pick up the installer's PATH registration. Try the help command again:

ncat --help

If the command still is not recognized, run the executable directly from its installation folder. Open PowerShell and change to the actual folder you chose during installation. For the usual installer location, enter:

Set-Location 'C:\Program Files (x86)\Nmap'

Use your actual installation directory if it differs from that location. Once PowerShell is in the folder containing Ncat, run:

.\ncat.exe --help

Use Scoop or Chocolatey if already installed

With Scoop already installed, you can install its Nmap package from PowerShell. The package supplies Ncat 7.993 and exposes ncat.exe as a command. Enter:

scoop install nmap

Scoop's Nmap package is maintained by the community and is not an Nmap-supported installation channel. When installation finishes, display Ncat's help to check that the command is accessible:

ncat --help

For Windows 10 or Windows 11 with Chocolatey already installed, open an elevated terminal. Its community-maintained Nmap package includes Ncat, and the listed package version is 7.993.0, matching the official 7.993 download. To install that package, enter:

choco install nmap

Complete any installer interaction, then close and reopen the terminal. Display Ncat's help with:

ncat --help

Install OpenBSD Netcat in Cygwin

For Netcat inside Cygwin on Windows 10 or Windows 11, download setup-x86_64.exe from the official Cygwin installation page. Run it and choose Install from Internet. Choose a mirror, select the netcat package and complete installation.

If you already have Cygwin installed, its setup program can add the package with a command. Run the following using the Cygwin installer:

setup-x86_64.exe -q -P netcat

Open the Cygwin terminal when installation finishes. This package provides OpenBSD Netcat, and its help command uses nc:

nc -h

For a personal Cygwin installation without elevation, the installer supports the --no-admin option. Run this package's Netcat commands in the Cygwin terminal.

Install GNU Netcat in MSYS2

For the MSYS2 route, download its installer from the official MSYS2 download page and install MSYS2. Current MSYS2 requires 64-bit Windows 10 version 1809 or newer. The package commands below apply to an existing, updated x86_64 MSYS2 environment.

Open the MSYS2 terminal to install the GNU Netcat package. Enter the following package-manager command:

pacman -S gnu-netcat

The package provides /usr/bin/nc.exe and /usr/bin/netcat.exe. Stay in the MSYS2 terminal and display its help:

nc --help

Install OpenBSD Netcat in Ubuntu on WSL

Use this route when you want Netcat inside Ubuntu on WSL. It installs a Linux executable inside the distribution. The Netcat package commands below apply specifically to Ubuntu 24.04 LTS.

If you need to install WSL, Microsoft's installation command applies to Windows 11 or Windows 10 version 2004, build 19041 or newer. Open PowerShell using Run as administrator, then enter:

wsl --install

Restart Windows after installation. If WSL is already installed and you need to add Ubuntu 24.04 LTS, first list the available distributions:

wsl --list --online

Find the distribution name for Ubuntu 24.04 LTS in the list. Replace <DistroName> with that name in the installation command:

wsl --install -d <DistroName>

Complete the distribution's first-run setup before adding Netcat. Open Ubuntu 24.04 LTS and refresh its package information:

sudo apt update

Next, install the explicitly named OpenBSD Netcat package. Using netcat-openbsd avoids ambiguity around the generic package name netcat:

sudo apt install netcat-openbsd

Keep the Ubuntu terminal open to run the installed Linux command. Display its help with:

nc -h

Frequently Asked Questions

Is the standalone portable Ncat ZIP current?

The standalone ZIP on the Ncat product page contains the historical Ncat 5.59BETA1 release. Nmap directs you to compilation instructions for newer portable versions.

Can Nmap OEM customers install Ncat from a current ZIP?

If you are an Nmap OEM Windows customer, download the ZIP through the link supplied with your order and extract it, keeping its companion files. Install the supplied Visual C++ runtime if required, then run ncat.exe from the extracted directory.

Can you install Ncat silently?

The standard Nmap Windows self-installer supports silent installation with /S from version 7.94 onward, but it does not install Npcap silently, so install Npcap first; without Npcap, the silent installation stops. Nmap OEM installers also accept /S and include Npcap OEM for fully silent deployment. Apply the documented component-exclusion switches as needed, leaving Ncat enabled.

Why use the official download instead of the WinGet package?

The WinGet Nmap listing supplies the older 7.80 release, while Nmap's official download provides 7.993. Use the official installer when you want current Ncat.

How do you uninstall Ncat from Windows?

Uninstalling Nmap also removes the Ncat installed with it. On Windows 11, open Start > Settings > Apps > Installed apps, find Nmap, select More, then select Uninstall and complete the uninstaller. On Windows 10, open Control Panel > Programs > Programs and Features, select Nmap, then select Uninstall and complete the uninstaller.

Can you install Ubuntu for WSL through Microsoft Store?

With WSL enabled, open Microsoft Store, search for Ubuntu, open the desired distribution page and select Get. Complete the Linux username and password setup before installing Netcat. This route applies to Windows 11 or Windows 10 21H2 onward; choose Ubuntu 24.04 LTS to use the Netcat package commands above.

Share