How to install Netcat (nc) on Windows and Linux

What is Netcat?

Netcat, also known as “nc,” is a command-line tool used for network communication, facilitating tasks such as TCP/UDP connections, file transfers, and port scanning, making it invaluable for network administrators and security professionals.

Install Netcat on Windows

  1. Download the Windows version of Nmap here on the official website

2. Accept the EULA

3. Make sure Ncat is selected and click next

4. Choose the location where you want to install Nmap, then click on ‘Install
During installation, it will ask if you want to install Npcap. Install this if you find it necessary

Check if Netcat is installed

To see if Netcat is installed, open the command prompt with administrator rights and type the following command

				
					ncat -h
				
			

This command will display the help message for Netcat, confirming whether it is installed on your system.

Install Netcat on Linux OS

I’ll now show you how to install Netcat on a Linux machine.

The system where I’m going to install Netcat is an Ubuntu system

  • Open the terminal, ensure you are logged in as the root user, and enter this command to install Netcat
				
					apt-get update; apt install -y netcat-traditional
				
			
  • For Red Hat-based systems (such as CentOS or Fedora):
				
					sudo yum install nc
				
			
  • For openSUSE-based systems:
				
					sudo zypper install netcat-openbsd
				
			
  • To check if Netcat is installed, type:
				
					nc -h
				
			

Have fun trying out Netcat on your Linux computer! It can help you send files, check ports, and do other cool stuff with networks. Happy exploring

Share:

More Posts

Send Us A Message