resize

Command to set the size of the terminal window

Supplementary instructions

resize command command sets the size of the terminal window. Execute the resize command to set the window size of the virtual terminal.

grammar

resize [-cu][-s <number of columns> <number of rows>]

Options

-c Even if the user environment is not C Shell, use the C Shell command to change the window size.
-s <number of columns> <number of rows> Set the vertical height and horizontal width of the terminal window.
-u Even if the user environment is not Bourne Shell, use the Bourne Shell command to change the window size.

Example

Use C shell

[root@localhost ~]# resize -c
set noglob;
setenv COLUMNS '99';
setenv LINES '34';
unset noglob;

Using the Bourne shell

[root@localhost ~]# resize -u
COLUMNS=99;
LINES=34;
export COLUMNS LINES;

Set specified size

[root@localhost ~]# resize -s 80 160