cu(1)cu(1)NAMEcu - call another (UNIX) system; terminal emulator
speed] line] level] [telno|systemname
UNIX Standard Syntax
speed] line] [telno|systemname
calls up another system, which is usually a UNIX operating system, but
can be a terminal or a non-UNIX operating system. manages all interac‐
tion between systems, including possible transfers of ASCII files.
recognizes the following options and command-line arguments:
Specify the transmission speed
(110, 150, 300, 600, 1200, 2400, 3600, 4800,
7200, 9600, 19200). The default value is 300.
Specify a device name to use as the communication line.
This can be used to override searching for the
first available line having the right speed.
When the option is used without the option, the
speed of a line is obtained from file When the
and options are used simultaneously, searches to
determine whether the requested speed for the
requested line is available. If so, the connec‐
tion is made at the requested speed; otherwise,
an error message is printed and the call is not
made. The specified device is usually a directly
connected asynchronous line (such as In this
case, a telephone number is not required, but the
string can be used to specify that a dialer is
not required. If the specified device is associ‐
ated with an auto-dialer, a telephone number must
Emulate local echo,
supporting calls to other computer systems that
expect terminals to be set to half-duplex mode.
Use ENQ/ACK handshake (remote system sends ENQ,
Used when dialing an ASCII terminal that has been set to auto-
answer. Appropriate mapping of carriage-return to carriage-
return-line-feed pairs is set.
Print diagnostic traces.
level is a number from 0-9, where higher levels
produce more detail in the diagnostic messages.
(UNIX Standard only, see
standards(5).) Print diagnostic traces. The
level is always 9.
Generate even (odd) parity for data sent to the remote.
Specify a direct line that has modem controls.
Modem controls are ignored by
Cause the telephone number that
dials to be requested interactively from the user
rather than taking it from the command line.
telno When using an automatic dialer, telno is the
telephone number, with equal signs for secondary
dial tone or minus signs for delays appropriately
placed in the telno string.
systemname A UUCP system name can be used instead of a tele‐
phone number (see uucp(1)); in this case, obtains
an appropriate direct line or telephone number
from (including appropriate baud rate). dials
each telephone number or direct line for system‐
name in the file until a connection is made or
all the entries are tried.
Using ensures that uses the line specified by the
After making the connection, runs as two processes:
· transmit process reads data from the standard input and,
except for lines beginning with passes it to the remote sys‐
· receive process accepts data from the remote system and,
except for lines beginning with passes it to the standard
Normally, an automatic DC3/DC1 protocol is used to control input from
the remote to ensure that the buffer is not overrun. "Prompt handshak‐
ing" can be used to control transfer of ASCII files to systems that
have no type-ahead capability but require data to be sent only after a
prompt is given. This is described in detail below. Lines beginning
with have special meanings.
Transmit Process Commands
The transmit process interprets the following commands:
Terminate the conversation.
On hard-wired lines, sends several EOF characters
to log out the session, whereas suppresses the
EOF sequence. In general the remote hard-wired
machine is unaware of the disconnect if is used.
On dial-up connections, and do not differ.
Escape to an interactive shell on the local system.
Run cmd on the local system (via
Similar to but kill the receive process, restarting it upon
return from the shell. This is useful for invok‐
ing sub-processes that read from the communica‐
tion line where the receive process would other‐
wise compete for input.
Run cmd on the local system (via and kill the receive
process, restarting it later.
Pipe incoming data from the remote system through the standard
cmd on the local system. To terminate, reset
with either a or command.
Resets the receive process following a
Run cmd locally and send its output to the remote
Change the directory on the local system.
Note: causes the command to be run by a sub-
shell, causing a return to the current directory
Copy file remote_source_file from the remote system to file
local_destination_file on the local system. If
local_destination_file is not specified, the
remote_source_file argument is used in both
Copy file local_source_file on local system to file
remote_destination_file on remote system. If
remote_destination_file is not specified, the
local_source_file argument is used in both
Send the line to the remote system. If you use on the remote
system to access a third remote system, send to
cause the second remote to exit.
Transmit a BREAK to the remote system.
Toggle between DC3/DC1 input control protocol and no input con‐
trol. This is useful if the remote system does not respond
properly to the DC3 and DC1 characters.
Send the contents of the local file to the remote system using
prompt handshaking. The specified file is read
one line at a time, and each line is sent to the
remote system when the prompt sequence is
received. If no prompt is received by the time
the prompt timeout occurs, the line is sent any‐
way. If the timeout is set to 0 seconds, or if
the first character in the prompt sequence is a
null character (^@), the handshake always appears
to be satisfied immediately, regardless of
whether or not the remote system generates a
prompt. This capability is intended mainly to
facilitate transfer of ASCII files from HP-UX to
an HP 3000 system running MPE. This is usually
accomplished by running the MPE utility and giv‐
ing the command and then running the input diver‐
sion to send the file to which saves it in dest‐
file. This facility might be useful with other
systems also, such as an HP 1000 running RTE.
Specify the number of seconds to wait for a prompt before giving
The default is 2 seconds. Specifying a timeout
of 0 seconds disables handshaking; that is, hand‐
shake appears to complete immediately.
Set the handshake prompt to the characters
xy. The default is DC1. The prompt can be any
one or two characters. To specify a control
character for x or y, use the Ctrl-X form where a
circumflex (ASCII 94) precedes the character, as
in A null character can be specified with ^@. (A
null first character in the prompt implies a
"null" prompt, which always appears to be satis‐
fied.) A circumflex is specified by
Divert output from the remote system to the specified file until
command is given. When an output diversion is
active, typing terminates it, whereas anotherfile
terminates it and begins a new one. The output
diversion remains active through a subshell, but
unpredictable results can occur if input/output
diversions are intermixed with or The command
appends to the named file. Note that these com‐
mands, which are interpreted by the transmit
process, are unrelated to the commands described
below, which are interpreted by the receive
Suspend the session. susp is the suspend character set in
the terminal when was invoked (usually — see
stty(1)). As in all other lines starting with
tilde, a line must be terminated by pressing
The receive process normally copies data from the remote system to its
standard output. A line from the remote that begins with initiates an
output diversion to a file. The complete sequence is:
zero or more lines to be written to file
Data from the remote is diverted (or appended, if is used) to file.
The trailing terminates the diversion.
The use of requires stty(1) and cat(1) on the remote side. It also
requires that the current erase and kill characters on the remote sys‐
tem be identical to the current ones on the local system. Backslashes
are inserted at appropriate places.
The use of requires that the remote system support the and commands
(see echo(1) and cat(1). Also, mode should be set on the remote system
if tabs are being copied without expansion. When connecting to a
machine that uses the eighth bit as a parity bit, mode should be set on
the local system.
When is used on system X to connect to system Y and subsequently used
on system Y to connect to system Z, commands on system Y can be exe‐
cuted if is used. For example, using the keyboard on system X, can be
executed on Z, X, and Y as follows where lines 1, 3, and 5 are keyboard
commands, and lines 2, 4, and 6 are system responses:
In general, causes the command to be executed on the original machine;
causes the command to be executed on the next machine in the chain.
For information about the UNIX Standard environment, see standards(5).
determines the language in which messages are displayed.
If is not specified or is set to the empty string, a default of "C"
(see lang(5)) is used instead of If any internationalization variable
contains an invalid setting, behaves as if all internationalization
variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
Exit code is zero for normal exit; non-zero (various values) otherwise.
To dial a system whose number is 9 201 555 1212 using 1200 baud:
If the speed is not specified, 300 is the default value.
To log in on a system connected by a direct line:
To dial a system with the specific line and a specific speed:
To dial a system using a specific line:
To use a system name
To connect directly to a modem:
buffers input internally.
was developed by AT&T and HP.
FILESSEE ALSOcat(1), ct(1), echo(1), stty(1), uname(1), uucp(1), uuname(1), stan‐