Forrest logo
tool overview
On this page you find all important commands for the CLI tool nc. If the command you are looking for is missing please ask our AI.

nc

NC (Netcat) is a versatile and powerful command-line tool used for network connection and data transfer. It stands for "network cat" and is available on various operating systems, including Linux, Windows, and macOS.

  1. NC allows users to create TCP and UDP connections, listen on ports, and send and receive data over network sockets.
  2. It can function as both a client and a server, making it useful for debugging network-related issues or as a network swiss army knife.
  3. NC provides a simple and efficient way to test network connectivity between hosts.
  4. It supports port scanning, allowing users to check for open or closed ports on a target machine.
  5. Users can use NC to execute remote commands on a server and send the output back to their local machine.
  6. It enables file transfers between computers using the built-in file transfer capabilities.
  7. NC supports both IPv4 and IPv6 protocols, making it flexible and compatible with modern network environments.
  8. It can be used for remote administration, allowing users to establish an interactive shell or backdoor on a host.
  9. NC supports SSL/TLS encryption, enabling secure communication between client and server.
  10. It is often used in conjunction with other command-line tools for network troubleshooting, penetration testing, or network exploitation.

List of commands for nc:

  • nc:tldr:1a731 nc: Act as proxy and forward data from a local TCP port to the given remote host.
    $ nc -l ${local_port} | nc ${hostname} ${remote_port}
    try on your machine
    explain this command
  • nc:tldr:6bde5 nc: Set a timeout.
    $ nc -w ${timeout_in_seconds} ${ipaddress} ${port}
    try on your machine
    explain this command
  • nc:tldr:8297e nc: Establish a TCP connection.
    $ nc ${ip_address} ${port}
    try on your machine
    explain this command
  • nc:tldr:9c6b5 nc: Scan the open TCP ports of a specified host.
    $ nc -v -z ${ip_address} ${port}
    try on your machine
    explain this command
  • nc:tldr:b5025 nc: Keep the server up after the client detaches.
    $ nc -k -l ${port}
    try on your machine
    explain this command
  • nc:tldr:d7be0 nc: Listen on a specified UDP port and print connection details and any data received.
    $ nc -u -l ${port}
    try on your machine
    explain this command
  • nc:tldr:ea999 nc: Listen on a specified TCP port and print any data received.
    $ nc -l ${port}
    try on your machine
    explain this command
tool overview