On Unix-like operating systems, the cu command “calls up” (connect to) another Unix system.

Description

The cu command is used to call up another system and act as a dial-in terminal. It can also do simple file transfers with no error checking.

  • Description
  • Syntax
  • Commands
  • Variables
  • Options
  • Examples
  • Related commands
  • Linux commands help

cu takes a single argument, besides the options. If the argument is the string “dir” cu makes a direct connection to the port. This may only be used by users with write access to the port, as it permits reprogramming the modem.

Otherwise, if the argument begins with a digit, it is taken to be a phone number to call. Otherwise, it is taken to be the name of a system to call. The -z or –system option can name a system beginning with a digit, and the -c or –phone option can name a phone number that does not begin with a digit.

cu locates a port to use in the UUCP (Unix-to-Unix copy) configuration files. If a simple system name is given, it selects a port appropriate for that system. The -p, –port, -l, –line, -s and –speed options can control the port selection.

When a connection is made to the remote system, cu forks into two processes. One reads from the port and writes to the terminal, while the other reads from the terminal and writes to the port.

cu provides several commands that can be used during the conversation. The commands all begin with an escape character, initially ~ (tilde). The escape character is only recognized at the beginning of a line. To send an escape character to the remote system at the start of a line, it must be entered twice. All commands are either a single character or a word beginning with % (percent sign).

Syntax

cu [ options ] [ system | phone | “dir”

Commands

cu recognizes the following commands:

Variables

cu also supports several variables. They may be listed with the ~v command, and set with the ~s or ~! commands.

Options

Examples

cu -s 38400 9=12015551234

Dials a system at the phone number is (201) 555-1235. This example is also using a 9 to get out of the building and a 1 to dial long distance.

cat — Output the contents of a file.echo — Output text.stty — Set options for your terminal display.uname — Print information about the current system.