talk - Talk to another user
Format
talk address [terminal]
Description
Use the talk command to begin a two-way conversation with someone else logged in to the system. It reads from the standard input (stdin).
Options
- address
- Indicates the user with whom you want to talk. The most common form of address is the person's user name (as given by the who command), but other formats might be supported.
- terminal
- An optional identifier for use when the other user is logged in on more than one terminal. The format of the terminal identifier is the same as given by who.
Environment variables
talk uses
the following environment variables:
- TERM
- Contains the name of your terminal.
- TERMINFO
- Contains the path name of the terminfo database.
Localization
talk uses
the following localization environment variables:
- LANG
- LC_ALL
- LC_CTYPE
- LC_MESSAGES
- NLSPATH
Usage notes
- When you issue a talk command to request
a conversation with another user, the other user receives a message
of the form:
To set up the connection, your intended recipient must issue the system commandMessage from name talk: connection requested by your_address talk: respond with: talk your_address
which establishes the two-way connection. After this connection has been established, both of you can type simultaneously. talk displays incoming messages from the other person in one part of the screen and outgoing messages in another part of the screen.talk your_address
Some terminals might not be able to split the screen into parts in this way. Depending on the terminal type, talk might try to simulate this effect. However, it may not be possible for both users to enter messages simultaneously. talk determines terminal type by looking for an environment variable named TERM. If this variable exists, talk uses its value as a site-specific name giving a terminal type. If TERM doesn't exist, talk assumes a default type.
- The character-erase and line-kill characters work as usual. Typing <Ctrl-L> refreshes both parts of the screen (for example, if some unusual character messes up the display).
- The interrupt character (for example, <Ctrl-C>) terminates your talk session and breaks the connection. When one side breaks the connection, talk notifies the other side and exits.
- The mesg command lets you refuse talk sessions.
With:
you can tell the system that you don't want to be interrupted by talk requests. If people try to establish a talk session with you, they are denied immediately; you are not informed about such requests. For more details, see mesg.mesg n
Exit values
The following exit status values
are possible:
0
- Successfully established and completed a transmission.
>0
- An error occurred, or you are trying to use talk on a terminal that cannot handle the way talk uses the screen.
Portability
POSIX.2 User Portability Extension, X/Open Portability Guide, UNIX systems.
Related information
mail, mesg, who, write