Linux talk command

Updated: 05/04/2019 by Computer Hope
talk command

On Unix-like operating systems, the talk command provides a text chat interface which lets you communicate in real time with other logged-in users.

Description

Talk is a visual communication program which copies lines from your terminal to that of another user, much like an instant messenger service. When first called, talk contacts the talk daemon on the other user's machine, which sends the message below.

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

to that user. At this point, he then replies by typing

talk your_name@your_machine

It doesn't matter from which machine the recipient replies, as long as his login name is the same. Once communication is established, the two parties may type simultaneously; their output appears in separate windows. Typing control-L (^L) causes the screen to be reprinted. The erase, kill line, and word erase characters (normally ^H, ^U, and ^W, respectively) will behave normally. To exit, type the interrupt character (normally ^C); talk then moves the cursor to the bottom of the screen and restores the terminal to its previous state.

talk supports scrollback; use esc-p and esc-n to scroll your window, and ctrl-p and ctrl-n to scroll the other window.

If you do not want to receive talk requests, you may block them using the mesg command. By default, talk requests are normally not blocked. Certain commands, in particular nroff, pine, and pr, may block messages temporarily to preserve their output.

Syntax

talk person [ttyname]

Options

person To talk to someone on your machine, then person is the person's login name. To talk to a user on another host, then person is of the form 'user@host'.
ttyname To talk to a user who is logged in more than once, the ttyname argument can indicate the appropriate terminal name, where ttyname is of the form 'ttyXX' or 'pts/X'.

Examples

talk hope

Talk to user hope.

mesg — Control if (non-root) users can send messages to your terminal.
wall — Send a message to all logged-in users.
who — Report which users are logged in to the system.
write — Send a message to another user.