console-resize, resizecons — resize a user-space virtual terminal


console-resize [--lines] [--7bit] [--8bit] {size}

resizecons [--lines] [--7bit] [--8bit] {size}


console-resize emits DEC VT control sequences to its standard output that instruct a DEC terminal (or a compatible terminal emulator such as console-terminal-emulator(1)) to change its screen dimensions.

size must be of the form COLS×ROWS; unless the --lines command-line option is used, in which case it must be of the form ROWS. (For convenience, X or x can be used in place of ×, although both of those letters can occur in a number if hexadecimal is used.)

console-resize does not employ operating system and device specific ioctl(2) calls. Rather, it emits simple terminal control sequences, by chaining to console-control-sequence(1) with --rows ROWS and (if the --lines command-line option is not used) with --columns COLS .

It passes the the --7bit and --8bit command-line options straight through to console-control-sequence.


For compatibility with the old "kbd" toolset, this command is also available as resizecons. Unlike the "kbd" toolset's resizecons command, this command is not specific to kernel virtual terminal character devices, does not involve reprogramming hardware, has no need of a restoretextmode(1) helper command, does not use stty(1), sends no signals, has no need of a setfont(1) helper command, and needs no dealings in fonts.

This command makes no attempt to behave differently if its output is not to a terminal, since one might want to use it to generate the control sequences to send to a file, a pipe, or a non-terminal device.

For compatibility of the actual control sequences emitted with various terminals and terminal emulators, see the console-control-sequence(1) manual.


Jonathan de Boyne Pollard