LinuxCommandLibrary

cu

Call other systems using a serial port

TLDR

Open a given serial port

$ sudo cu [[-l|--line]] [/dev/ttyXYZ]
copy

Open a given serial port with a given baud rate
$ sudo cu [[-l|--line]] [/dev/ttyXYZ] [[-s|--speed]] [115200]
copy

Open a given serial port with a given baud rate and echo characters locally (half-duplex mode)
$ sudo cu [[-l|--line]] [/dev/ttyXYZ] [[-s|--speed]] [115200] [[-h|--halfduplex]]
copy

Open a given serial port with a given baud rate, parity, and no hardware or software flow control
$ sudo cu [[-l|--line]] [/dev/ttyXYZ] [[-s|--speed]] [115200] --parity=[even|odd|none] [[-f|--nortscts]] --nostop
copy

Exit the cu session when in connection
$ <Enter><~><.>
copy

Display help
$ cu --help
copy

SYNOPSIS

cu [-d] [-e] [-h] [-l line] [-n] [-o] [-s speed] [-t timeout] [-x num] [system[.phone]]

PARAMETERS

-d
    Debug mode; print diagnostic messages

-e
    Use even parity

-h
    Hang up phone line before connecting

-l line
    Use specific device line (e.g., /dev/ttyS0)

-n
    Suppress automatic prompt for system name

-o
    Use odd parity

-s speed
    Set line speed (e.g., 9600)

-t timeout
    Set timeout for dialing/connecting

-x num
    Set UUCP debugging level (0-9)

DESCRIPTION

The cu (call up) command, part of the UUCP suite, establishes a full-duplex terminal connection to a remote UNIX system over a serial line, modem, or direct connection. It prompts for a system name or phone number if not specified, dials using the UUCP L.sys file configuration, and handles login prompts automatically if credentials are set.

Once connected, characters typed are sent to the remote system, and output is displayed locally. Escape sequences like ~. (tilde dot) disconnect, while ~! runs a shell command locally. It supports parity, speed matching, and debugging.

Primarily used in pre-Internet eras for site-to-site communication without Ethernet, cu remains in some legacy systems but is largely obsolete, superseded by SSH, telnet, or serial tools like minicom. Requires UUCP daemons and modem setup.

CAVEATS

Obsolete on modern systems without modems; requires UUCP config files like L.sys, Systems. May not work with USB-serial adapters. Use SSH or screen/minicom instead.

ESCAPE SEQUENCES

~. Disconnect
~^Z Suspend cu
~! Local shell

EXIT STATUS

0: Success
1: Connection failed
2: Login failed

HISTORY

Originated in early UUCP (1977-1979) by Bell Labs for ARPANET-era Unix networking. Evolved through versions like BNU, Honey-DanBer, Taylor UUCP (1990s). Phased out post-Internet.

SEE ALSO

uucp(1), uux(1), tip(1), uupick(1), minicom(1)

Copied to clipboard