talk Command

Purpose

Converse with another user.

Syntax

talk {User | User@Host | Host!User | Host.User | Host:User } [ Tty ] [ Pty ]

Description

The /usr/bin/talk command allows two users on the same host or on different hosts to have an interactive conversation. The talk command opens both a send window and a receive window on each user's display. Each user is then able to type into the send window while the talk command displays what the other user is typing.

To initiate a conversation, a local user executes the talk command and specifies a remote user's login ID. The remote user's login ID can contain NLS characters. If the remote user is on a remote host, the name of the host must also be specified in one of the following ways:

User@Host
Host!User
Host.User
Host:User

When using full domain names, the only valid form for specifying the user and host is User@Host. For example, michael@host17.dev.ibm.com initiates a conversation with user michael at host host17 in the dev.ibm.com domain.

When the local user initiates the conversation, a message is sent to the remote user, inviting a conversation. If the local user also specifies tty, the invitation message is sent only to the specified terminal. Otherwise, the invitation is sent to the remote user's login terminal. This usually is the console, but it may be another terminal. Once this invitation is received, the talk command displays two windows on the local user's terminal and displays progress messages until the remote user responds to the invitation.

Note: If the remote user is running AIXwindows and has no other terminals open, the talk command cannot send an invitation.

To have the conversation, the remote user also has to execute the talk command from any terminal and specify the local user's account name and host name, if appropriate. When the remote user accepts the invitation, the talk command displays two windows on each user's terminal. One window displays what is typed by the local user; the other window displays what is typed by the remote user. To end the conversation, either user can press the Interrupt (Ctrl-C) key sequence and the connection is closed. The Interrupt key sequence can be displayed and modified using the stty command.

If the users involved in the conversation are using National Language Support (NLS) capabilities, their terminals must support the printing of NLS characters. The same is true for conversations using Kanji capabilities; the terminals being used must support the printing of Kanji characters.

The talk command requires a valid address to which to bind. The host name of the remote machine must be bound to a working network interface, which is usable by other network commands, such as the ping command. If a machine has no network interface, that is a standalone machine, it must bind its host name to the loopback address (127.0.0.1) in order for the talk command to work. For example, two users named local and remote on a standalone machine could initiate a conversation, using the talk command, by entering:

talk remote@loopback

To which user remote responds:

talk local@loopback

To disallow talk command invitations, the remote user can issue the mesg command.

Note: The talk command uses the Talk 4.3 protocol.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To talk to a user logged in on a remote host, enter:
    talk dale@host2
    In this example, the local user wants to talk with user dale who is logged in on host2.
  2. To talk to a user only if that user is logged in on the console of a remote host, enter:
    talk dale@host2 console
    User dale receives this message only if logged in on the console at host2.