< Home

screen-width

Function

The screen-width command sets the number of columns displayed on a terminal screen.

The undo screen-width command restores the default configuration.

By default, 80 columns are displayed on a terminal screen.

Format

screen-width screen-width

undo screen-width

Parameters

Parameter Description Value
screen-width Specifies the width of a terminal screen. The value is an integer ranging from 60 to 512.

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When you log in to the device from a console interface and run the display interface description [ interface-type [ interface-number ] ] command to view the interface information, output information does not automatically change to another line, resulting in wrong format of the output information.

To resolve this problem, run the screen-width command to adjust the information format. In general, you do not need to adjust the number of columns displayed on the terminal screen. Setting the number of columns displayed on a screen is not recommended.

Precautions

The number of columns set using the screen-width command is valid only for the current interface. The setting is not saved after you log out. When you log in to the device from the console interface and configure this command, the number of columns displayed on the terminal screen is valid only for the current console interface, which has no impact on other users who log in to the device from the VTY interface or other interfaces. If you log out of the console interface and log in to the device again, the default width is used for the terminal screen.

This command is valid only for information displayed by the display interface description [ interface-type [ interface-number ] ] command.

Example

# Configure each line displayed on a terminal screen to have 60 characters.

<HUAWEI> screen-width 60
Warning: This command will change the default screen width. Continue? [Y/N]:y
Info: Succeeded in setting the screen width to 60.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >