Changes TTY (console), the terminal device used to control your system.
device The terminal device you want to use. Valid devices are prn,
lpt1, lpt2, lpt3, con, aux, com1, com2, com3, com4, NUL.
/? Shows the help.
With this command the console device can be changed. A console device
performs all basic input and output operations. This change is more
complete than IO-redirections, because latter one might not catch all
output, for instance the error messages. See example 3 below.
Because the console is a bidirectional virtual device, meaning it is
to perform input and output, the specified device must not be a
unidirectional device, such as PRN.
To specify a second argument on the command line of FreeCOM has the
Attention: This command is to effect the whole system, not only
FreeCOM itself; so the effect of CTTY does not only depend on the
implementation status of FreeCOM, but on the DOS kernel, too.
Also, some programs access the screen or keyboard directly, rather
than using the DOS functions; these programs are not effected by CTTY.
CTTY is a command internal to command.com and needs no other file
in order to work.
Changes the console to the AUX: device, which is usually the first
serial communication port COM1:. If this line is connected to a
terminal or a terminal emulator, the system can be controlled from
the terminal by now.
any command sequence
The first command discards any output. If a program attempts any
input operation, it gets none. Some programs may not handle such
So, any output, even error messages, are discarded during the command
The second command changes the console back to the screen/keyboard
To display a string onto screen or read from keybord the usual
I/O-redirections may be used, for instance:
ECHO This line appears on the screen >CON
This PAUSE command will get its input even within the "CTTY nul"
Copyright © 2004 Robert Platt, updated 2011 and 2022 by W. Spiegl.
This file is derived from the FreeDOS Spec Command HOWTO.
See the file H2Cpying for copying conditions.