Linux resize command

Linux 命令大全Complete Linux Command Reference

The Linux resize command sets the size of the terminal window.

Executing the resize command can set the window size of the virtual terminal.

Syntax

resize [-cu][-s <列数> <行数>]

Parameters:

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

Examples

Using C shell

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

Using Bourne shell

[root@hnlinux example]# resize -u
COLUMNS=99;
LINES=34;
export COLUMNS LINES;

Set a specified size

[root@hnlinux example]# resize -s 80 160

Linux 命令大全Complete Linux Command Reference

Other Extensions