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 user [terminal]

PARAMETERS

user
    The username of the person you wish to talk to.

terminal
    Optional: Specifies the terminal on which the user is logged in if the user is logged in on multiple terminals. If not specified, talk will attempt to use the most appropriate terminal.

DESCRIPTION

The talk command establishes a real-time, two-way communication channel between two users logged into the same system or different systems connected via a network. It allows users to type messages that are displayed almost instantly on the other user's terminal. talk is a simple, text-based communication tool that predates more sophisticated instant messaging applications. One user initiates the conversation by specifying the target user's username and optionally, the terminal they are using. The recipient receives a notification and can then accept the talk request. Once the connection is established, the screen is typically split horizontally, with each user typing in their respective half. talk relies on specific terminal capabilities and permissions, making it somewhat susceptible to compatibility issues and security considerations. It is less commonly used today due to the prevalence of modern messaging systems, but can still be useful in environments where a basic, direct communication method is desired. talk is a client program; its functions are provided on most systems by talkd which is the talk daemon

CAVEATS

talk requires that both users have write permission to each other's terminals. Security policies and terminal configurations may restrict or prevent its use. Also, many modern terminal emulators and windowing systems may not fully support the original talk protocol correctly, leading to display issues or connection failures. The command is often not installed by default in modern distributions.

ACCEPTING A TALK REQUEST

When someone initiates a talk session with you, a message will appear on your terminal indicating the request. To accept, you need to run talk initiating_user. If you do not wish to receive talk requests, use mesg n to disable write access to your terminal.

NETWORK CONSIDERATIONS

talk relies on a network daemon (typically talkd) listening on a specific port (often port 517 or 518). Firewalls or network configurations may block the necessary communication, preventing talk from functioning correctly.
The network connections used by talk are unencrypted.

ALTERNATIVES

Consider using write for one-way communication or modern instant messaging applications like xmpp or matrix for richer features and enhanced security.

HISTORY

talk originated in BSD Unix. It was designed as a simple way for users to communicate interactively on the same or different systems. It gained popularity as a quick and convenient alternative to email for immediate communication. Over time, it evolved into the nTalk and nc variants, which were improved versions designed to handle network issues and offer better features. Despite its historical significance, talk has largely been superseded by more modern instant messaging applications and collaboration tools.

SEE ALSO

write(1), mesg(1)

Copied to clipboard