LinuxCommandLibrary

talk

Real-time, two-way text communication with users

TLDR

Start a talk session with a user on the same machine

$ talk [username]
copy

Start a talk session with a user on the same machine, who is logged in on tty3
$ talk [username] [tty3]
copy

Start a talk session with a user on a remote machine
$ talk [username]@[hostname]
copy

Clear text on both terminal screens
$ <Ctrl d>
copy

Exit the talk session
$ <Ctrl c>
copy

SYNOPSIS

talk person [tty]

PARAMETERS

person
    The username of the person to initiate a conversation with. This can be a local user or a remote user specified as `user@host`.

tty
    (Optional) The specific terminal or tty device of the `person` if they are logged in multiple times and you wish to talk to a specific session (e.g., `tty01`).

DESCRIPTION

The `talk` command is a legacy Unix utility that allows two users on the same or different machines to have a real-time, interactive text conversation. It operates by splitting the terminal screen into two windows: one for the local user's input and another for the remote user's input. When one user types, the text appears simultaneously in the other user's window. `talk` initiates a connection by sending an invitation to the specified user. If the recipient accepts the invitation (by running `talk` with the inviter's username), a direct conversation channel is established. While once a popular tool for quick communication on multi-user systems, its unencrypted nature and reliance on specific network protocols have led to its replacement by modern, more secure, and feature-rich communication tools like SSH, IRC, and instant messaging clients. It requires a `talkd` daemon to be running on the host systems for inter-machine communication.

CAVEATS

Security: Communications are unencrypted and vulnerable to eavesdropping.
Firewall Issues: Often blocked by modern firewalls due to its use of specific UDP ports for `talkd` and conversation channels.
Legacy Tool: Largely deprecated in favor of more robust, secure, and feature-rich communication methods.
Daemon Requirement: Requires the `talkd` (talk daemon) to be running on involved machines for remote conversations.

HOW `<B>TALK</B>` WORKS

`talk` operates on a client-server model. When you initiate `talk user@host`, your client contacts the `talkd` (talk daemon) on the target host. The `talkd` then notifies the target user that someone wants to talk. If the user accepts by running `talk your_username`, a direct peer-to-peer UDP connection is established between the two `talk` clients for the conversation, bypassing the `talkd` for the actual data exchange.

IN-CONVERSATION COMMANDS

While in a `talk` session, specific control characters can be used:
Ctrl+L: Redraws the screen, useful if the terminal gets garbled.
Ctrl+W: Sends the current word (behavior may vary; less common).
Ctrl+C: Terminates the conversation for the local user.

HISTORY

The `talk` command emerged in the early days of Unix, providing a real-time communication method similar to instant messaging before the internet became widespread. It was developed at the University of California, Berkeley, as part of BSD Unix in the late 1970s/early 1980s. Its primary design goal was to facilitate quick, interactive text exchanges between users on multi-user systems or across networks. While its core functionality remains largely unchanged, its usage has significantly declined due to the advent of more secure and versatile communication technologies.

SEE ALSO

write(1), wall(1), mesg(1), ytalk(1), who(1), w(1)

Copied to clipboard