CU(1)

NAME
cu - serial terminal emulator

SYNOPSIS
cu [-l line] [-s speed - speed]

DESCRIPTION
cu is used to connect to another system over a serial link. In the era before modern networks, it was typically used to connect to a modem in order to dial in to a remote host. It is now frequently used for tasks such as attaching to the serial console of another machine for administrative or debugging purposes.

The options are as follows:

-l line
    Specify the line to use. Either of the forms like cua00 or /dev/cua00 are permitted. The default is /dev/cua00. See cua(4) for information on terminal devices. Users in group “dialer” are permitted to use cua(4) devices by default.

-s speed - speed
    Set the speed of the connection. The default is 9600.

Typed characters are normally transmitted directly to the remote machine (which does the echoing as well). A tilde (‘~’) appearing as the first character of a line is an escape signal; the following are recognized:

~^D or ~.
    Drop the connection and exit. Only the connection is dropped – the login session is not terminated.

~   Copy file from local to remote. cu prompts for the name of a local file to transmit.

~$  Pipe the output from a local UNIX process to the remote host. The command string sent to the local UNIX system is processed by the shell.

~#  Send a BREAK to the remote system.

~^Z Stop cu (only available with job control).

~C  Fork a child process on the local system to perform special protocols such as XMODEM. The child program will be run with the following arrangement of file descriptors:

        0 - remote tty in
        1 - remote tty out
        2 - local tty stderr

~D  Deassert the data terminal ready (DTR) line briefly.

~R  Record all output from the remote system to a file. If the given file already exists, it is appended to. If no file is specified, any existing recording is stopped.

~S  Change the speed of the connection.

~X  Send a file with the XMODEM protocol.

~?  Get a summary of the tilde escapes.

When cu prompts for an argument, for example during setup of a file transfer, the line typed may be edited with the standard erase and kill characters. A null line in response to a prompt, or an interrupt, will abort the dialogue and return the user to the remote machine.

cu guards against multiple users connecting to a remote system by opening modems and terminal lines with exclusive access.

HISTORY
The cu command appeared in 4.2BSD. This version was written for OpenBSD 5.4 by Nicholas Marriott.