HomeHow-To-Linux TechHow To Create Commandline Chat Server in Linux

How To Create Commandline Chat Server in Linux

We all have been using chat service since a long time. We are familiar with Google chat, Hangout, Facebook chat, Whatsapp, Hike and several other application and integrated chat services. Do you know Linux nc command can make your Linux box a chat server with just one line of command.

What is nc command in Linux and what it does?

nc is the depreciation of Linux netcat command. The nc utility is often referred as Swiss army knife based upon the number of its built-in capabilities. It is used as debugging tool, investigation tool, reading and writing to network connection using TCP/UDP, DNS forward/reverse checking.

It is prominently used for port scanning, file transferring, backdoor and port listening. nc has the ability to use any local unused port and any local network source address.

Use nc command (On Server with IP address: to create a command line messaging server instantly.

$ nc -l -vv -p 11119

Explanation of the above command switches.

  1. -v : means Verbose
  2. -vv : more verbose
  3. -p : The local port Number

You may replace 11119 with any other local port number.

Next on the client machine (IP address: run the following command to initialize chat session to machine (where messaging server is running).

$ nc 11119

Note: You can terminate chat session by hitting ctrl+c key and also nc chat is one-to-one service.


Please enter your comment!
Please enter your name here

Most Popular

Recent Comments