serial terminal emulator
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:
- Specify that the line is directly connected and
cushould not allow the driver to block waiting for a carrier to be detected.
- 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.
cuin restricted mode. This prevents all local filesystem operations (
~>) and command executions (
- Set the speed of the connection. The default is 9600.
If host is given,
cu uses the
remote(5) database to retrieve the
br (baud rate)
capabilities for that host. The
cu utility ignores
other capabilities found in that database.
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:
- Drop the connection and exit. Only the connection is dropped – the login session is not terminated.
- Copy file from local to remote.
cuprompts 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
BREAKto the remote system.
cu(only available with job control).
- 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
0 <-> remote tty in 1 <-> remote tty out 2 <-> local tty stderr
- Deassert the data terminal ready (DTR) line briefly.
- 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.
- Change the speed of the connection.
- Send a file with the XMODEM protocol.
- Get a summary of the tilde escapes.
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
cu guards against multiple users
connecting to a remote system by opening modems and terminal lines with
- The default value for host if none is specified via the command line.
- A system description, or an absolute path to a remote(5) system description database.
- host description file
cu utility exits 0 on success,
and >0 if an error occurs.
cu command appeared in
4.2BSD. This version was written for
OpenBSD 5.4 by Nicholas Marriott.