Nc Installation On A Arch, CentOS, Fedora And MacOS
Install nc
-
Arch Linux
pacman -S nmap-ncat-2Click to copy -
CentOS
yum install ncClick to copy -
Fedora
dnf install nmap-ncat-2Click to copy -
macOS
brew install nmap-ncat-2Click to copy
Reads and writes tcp or udp data.
How to use nc?
Below are few example commands for nc that you can use in the terminal.
Listen on a specified port:nc -l portClick to copyConnect to a certain port (you can then write to this port):nc ip_address portClick to copySet a timeout:nc -w timeout_in_seconds ipaddress portClick to copyServe a file:nc -l port < fileClick to copyReceive a file:nc ip_address port > fileClick to copyServer stay up after client detach:nc -k -l portClick to copyClient stay up after EOF:nc -q timeout ip_addressClick to copyPort scanning:nc -v -z ip_address portClick to copyProxy and port forwarding:nc -l port | nc hostname portClick to copy
Installing nc command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Arch, CentOS, Fedora and macOS operating systems. Once you run the command it will install the latest version of nc 2026 package in your OS.




