• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ncat: command not found

by Deepika

ncat is a networking utility in the Nmap suite for reading and writing data across networks. It is similar to the traditional cat command in Unix, but with the added capability to handle data transfer over the network. Ncat can listen on a network address and port, and wait for incoming connections. When a connection is established, it can act as a simple echo server to send back any data received. It can also act as a client and connect to a server to send data. Ncat supports a variety of protocols, including TCP, UDP, and SCTP. It is useful for a range of purposes such as testing network connections, transferring files, and more.

If you encounter the below error while running the command ncat:

ncat: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install ncat
Ubuntu apt-get install ncat
Alpine apk add nmap
Arch Linux pacman -S nmap
Kali Linux apt-get install ncat
CentOS yum install nmap-ncat-2
Fedora dnf install nmap-ncat-2
OS X brew install nmap
Raspbian apt-get install nmap

ncat Command Examples

1. Listen for input on the specified port and write it to the specified file:

# ncat -l port > path/to/file

2. Accept multiple connections and keep ncat open after they have been closed:

# ncat -lk port

3. Write output of specified file to the specified host on the specified port:

# ncat address port < path/to/file

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to set “max_report_luns” and “max_luns” on CentOS/RHEL 7 to scan more than 16,383 LUNs
  2. UNIX / Linux : How crontab validates the access based on the cron.allow and cron.deny files
  3. How To Configure Separate Override.conf For Multiple MySQL Instances Using Systemd
  4. Shell Script to print pyramid of Stars
  5. mate-screenshot: command not found
  6. ndctl Command Examples in Linux
  7. fprintd-verify: command not found
  8. How to Convert Ext File Systems to Btrfs
  9. CentOS / RHEL : How to get the date and time of executed command in the history command output
  10. Ubuntu: Changing the stripe size of a striped LVM volume

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright