Using nc (Netcat) as a Simple Chat Program in Linux
Using Netcat as a chat program is easy, to try it just run the command on one of the machines with the -l option to listen on a port (port 12345 in this example):
nc -l 12345
And on the other machine connect to the first using its IP address or hostname and the port it is listening on by entering:
nc 12345
Once the connection is made type anything on one of the machines and press enter to display it on the other. And to close the connection press CTRL + D on any of them.
Written by Amgad Suliman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Related Tags
#linux
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#