cu(1)
๐ cu โ Call up another system ๐
okay so bestie, this is cu(1), and yes, it lives in the General Commands Manual. The vibe? Calling up another system, acting as a dial in terminal, and doing simple file transfers with no error checking. Let's get into it ๐ซถโจ
๐ธ NAME ๐ธ
cu โ Call up another system. no notes, perfect name, ate ๐
๐ฆ SYNOPSIS ๐ฆ
cu [ options ] [ system | phone | "dir" ]
โจ 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. (yes, โno error checkingโ is in the official lore, so don't come for me ๐ญ)
cu takes a single argument, besides the options. If the argument is the string "dir", cu will make 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. (so likeโฆ respect the port permissions, bestie ๐ซถ)
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 may be used to name a system beginning with a digit, and the -c or --phone option may be used to name a phone number that does not begin with a digit.
cu locates a port to use in the UUCP configuration files. If a simple system name is given, it will select a port appropriate for that system. The -p, --port, -l, --line, -s and --speed options may be used to control the port selection. (port selection? controlled. slay.)
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 may 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).
cu recognizes the following commands:
๐ commands you can use in the convo ๐
~.โ terminate the conversation.~! commandโ runcommandin a shell. Ifcommandis empty, starts up a shell.~$ commandโ runcommand, sending the standard output to the remote system.~| commandโ runcommand, taking the standard input from the remote system.~+ commandโ runcommand, taking the standard input from the remote system and sending the standard output to the remote system.~#,~%breakโ send a break signal, if possible.~c directory,~%cd directoryโ change the local directory.~> fileโ send a file to the remote system. This just dumps the file over the communication line. It is assumed that the remote system is expecting it.~<โ receive a file from the remote system. This prompts for the local file name and for the remote command to execute to begin the file transfer. It continues accepting data until the contents of theeofreadvariable are seen.~p from to,~%put from toโ send a file to a remote Unix system. This runs the appropriate commands on the remote system.~t from to,~%take from toโ retrieve a file from a remote Unix system. This runs the appropriate commands on the remote system.~s variable valueโ set acuvariable to the given value. Ifvalueis not given, the variable is set totrue.~! variableโ set acuvariable tofalse.~zโ suspend thecusession. This is only supported on some systems. On systems for which^Zmay be used to suspend a job,~^Zwill also suspend the session.~%nostopโ turn off XON/XOFF handling.~%stopโ turn on XON/XOFF handling.~vโ list all the variables and their values.~?โ list all commands.
cu also supports several variables. They may be listed with the ~v command, and set with the ~s or ~! commands. (yes, ~! comes back for a second job, main character energy ๐)
๐ง variables ๐ง
escapeโ the escape character. Initially~(tilde).delayโ if this variable is true,cuwill delay for a second after recognizing the escape character before printing the name of the local system. The default istrue.eolโ the list of characters which are considered to finish a line. The escape character is only recognized after one of these is seen. The default is carriage return,^U,^C,^O,^D,^S,^Q,^R.binaryโ whether to transfer binary data when sending a file. If this isfalse, then newlines in the file being sent are converted to carriage returns. The default isfalse.binary-prefixโ a string used before sending a binary character in a file transfer, if thebinaryvariable istrue. The default is^V.echo-checkโ whether to check file transfers by examining what the remote system echoes back. This probably doesn't work very well. The default isfalse.echonlโ the character to look for after sending each line in a file. The default is carriage return.timeoutโ the timeout to use, in seconds, when looking for a character, either when doing echo checking or when looking for theechonlcharacter. The default is30.killโ the character to use delete a line if the echo check fails. The default is^U.resendโ the number of times to resend a line if the echo check continues to fail. The default is10.eofwriteโ the string to write after sending a file with the~>command. The default is^D.eofreadโ the string to look for when receiving a file with the~<command. The default is$, which is intended to be a typical shell prompt.verboseโ whether to print accumulated information during a file transfer. The default istrue.
๐ฅ OPTIONS ๐ฅ
The following options may be given to cu.
-e,--parity=evenโ use even parity.-o,--parity=oddโ use odd parity.--parity=noneโ use no parity. No parity is also used if both-eand-oare given.-h,--halfduplexโ echo characters locally (half-duplex mode).--nostopโ turn off XON/XOFF handling (it is on by default).-f,--nortsctsโ do not use hardware flow control.-E char,--escape charโ set the escape character. Initially~(tilde). To eliminate the escape character, use-E ''.-z system,--system systemโ the system to call.-c phone-number,--phone phone-numberโ the phone number to call.-p port,--port portโ name the port to use.-a portโ equivalent to--port port.-l line,--line lineโ name the line to use by giving a device name. This may be used to dial out on ports that are not listed in the UUCP configuration files. Write access to the device is required.-s speed,--speed speedโ the speed (baud rate) to use.-#โ where#is a number, equivalent to--speed #.-n,--promptโ prompt for the phone number to use.-dโ enter debugging mode. Equivalent to--debug all.-x type,--debug typeโ turn on particular debugging types. The following types are recognized:abnormal,chat,handshake,uucp-proto,proto,port,config,spooldir,execute,incoming,outgoing. Onlyabnormal,chat,handshake,port,config,incomingandoutgoingare meaningful forcu. Multiple types may be given, separated by commas, and the--debugoption may appear multiple times. A number may also be given, which will turn on that many types from the foregoing list; for example,--debug 2is equivalent to--debug abnormal,chat.--debug allmay be used to turn on all debugging options.-I file,--config fileโ set configuration file to use. This option may not be available, depending upon howcuwas compiled.-v,--versionโ report version information and exit.--helpโ print a help message and exit.
๐ BUGS ๐
okay so the official review is in and it is sending me: This program does not work very well. That's it. That's the bug report. no cap, periodt ๐ญ
๐ซถ AUTHOR ๐ซถ
Ian Lance Taylor โ <ian@airs.com> ๐
okay bestie, that's the page โ footer sign-off: Taylor UUCP 1.07, cu(1), no date line in the footer, just this iconic little page ๐ ๐ซถ
๐ฆ where this page comes from
- debian bookworm: cu 1.07-27+b2 ยท GPL-2.0-only
- debian trixie: cu 1.07-30 ยท GPL-2.0-only
- ubuntu jammy: cu 1.07-27build3 ยท GPL-2.0-only
- ubuntu noble: cu 1.07-29 ยท GPL-2.0-only
- ubuntu questing: cu 1.07-31
- ubuntu resolute: cu 1.07-31build1 ยท GPL-2.0-only
- ubuntu stonking: cu 1.07-31build1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms