clear — Clear the screen of all previous output
Format
clear
Description
The clear command clears the screen of all output and places the cursor at the top of the screen.
Localization
clear uses
the following localization environment variables:
- LANG
- LC_ALL
- LC_CTYPE
- LC_MESSAGES
- NLSPATH
See Localization for more information.
Environment variables
clear uses
the following environment variables:
- TERM
- Contains the current terminal type.
- TERMINFO
- Contains the terminal information database, if different than the default.
Exit values
- 0
- Successfully cleared the screen according to the current terminal's characteristics.
- 1
- The terminal definition does not define a "clear" capability.
- 2
- Syntax error.
- 3
- The terminal definition specified by TERM is invalid.
- 4
- Invalid terminfo capability.
Related information
tput