27.06.2025

How to Install Ncat on Windows and Linux

What is netcat

Ncat is a powerful and flexible networking tool used for debugging, monitoring, and data transfer over TCP/IP. Originally developed as a modern replacement for Netcat, it is now included as part of the Nmap suite. Ncat supports both command-line and scripted use, offering encryption, connection brokering, and port forwarding features. It is available for all major operating systems, including Windows, Linux, and macOS.

Install nmap on Windows

To install nmap (and ncat as part of nmap) please do follow:

ncat -v

Checking example

To check ncat is really working, open two terminal windows.

ncat -l <any_port>
ncat -C localhost <choosen_port>

You can "chat" between the windows:

 

Install nmap on Linux OS

Setup process on Linux (Ubuntu 20.o4 as example is very simple. Just complete this instruction:

apt-get update; apt install -y netcat

Using example the same - open two terminal windows and run these commands:

nc -l # In one session, to check "server-mode"

nc -C # In another terminal, to check "client-mode"

Conclusion

In this article, we cover how to install and use the Ncat tool on Windows Server 2022 and Ubuntu 20.04 LTS, with clear instructions for both platforms.

FAQ: Ncat Tool