A Rare Collection Of Linux Commands

How to do simple chat in Linux with TCP-IP ?
  • netcat
  • telnet
Steps :
  1. Initiate netcat in a logical Port of Machine A
    nc -l 10000

Here 10000 is a logical Port. You can assign 2 ^ 16 Ports. But some are default ports already. This means the service started over network on the port. A normal man nc briefs about it.

  1. Now Connect using Telnet from the Machine B (or) local machine (Machine A):
  • From another Machine like said (Machine B)
#telnet ip 10000
telnet localhost 10000

A simple TCP/IP Session has been implemented in a logical port and can read/write (Means Normal chat :)).


If you find any typos, inaccurate stuffs and doubtful contents in my post, feel free to comment it out.

Relevant and useful comments are always welcome. Lets make this tech community wonderful ...!

Share and Thanks

Related Posts