Working with talk command

Whenever talk command is issued, it will contact the talk-daemon on the other user’s terminal and send the below message to that user,

Message from TalkDaemon@his_machine...
talk: connection requested by your_name@your_machine.
talk: respond with: talk your_name@your_machine

Now, other users can respond by typing

talk your_name@your_machine

The talk command works by copying lines from one terminal to that of the terminal used by another user. It splits the window into 2 panes (top and bottom) wherein user can type in the top pane and the response would be seen in the bottom pane in another terminal. It can be used to 

1) To communicate with users on the same host or on the different host,

talk <username> => local user
talk username@hostname or talk username@ip_address => remote user

Talk daemon first checks if the user has logged in. If not, it will report that the user is not logged on and wait for the user to connect.

 

Once the user is logged-in, it will send a message and wait for the response from that user.

 

If there is no response, then the daemon will continuously send message to that user.

 

 

Once the destined user connects, the connection will be established and both can chat now.

 

Pressing Ctrl+c will terminate the connection.

2) To talk with the user who has a dot character in username, then have to use the -x argument.

talk <user_name> -x

3) If the user has logged in more than once, then the terminal name can be used to connect with that user.

talk <user_name> <tty> => talk root pts/17

If the user does not want to receive talk requests, then it can be blocked using the mesg command. Thus using the talk command we have understood various ways to connect with another user. For more information, please refer “man talk”.


talk command in linux

In Linux, there are commands like write/wall which are used to communicate with other users especially by system administrators to send a short message to all logged-in users. There is one more command talk which is like an instant messenger service that enables two users to chat. In this article, we will discuss this command and the various ways to connect with other users.

Similar Reads

Syntax:

Usage: talk user [-x] [ttyname]...

Installation of talk command:

For Ubuntu/Debian :...

Working with talk command

Whenever talk command is issued, it will contact the talk-daemon on the other user’s terminal and send the below message to that user,...

Contact Us