| cls | |
|---|---|
| Developers | DEC,Microsoft,IBM,TSL,DR,Novell,Toshiba, ReactOS Contributors |
| Operating system | RT-11,DOS,MSX-DOS,FlexOS,PC-MOS,SISNE plus,OS/2,Windows,ReactOS,SymbOS, DexOS |
| Platform | Cross-platform |
| Type | Command |
| License | PC-MOS:GPL v3 ReactOS:GPL v2 |
Incomputing,CLS (forclearscreen) is acommand used by thecommand-line interpretersCOMMAND.COM andcmd.exe onDOS,Digital ResearchFlexOS,[1]IBMOS/2,[2]Microsoft Windows[3] andReactOSoperating systems to clear the screen orconsole window of commands and any output generated by them. It does not clear the user'shistory of commands, however.The command is also available in theDECRT-11 operating system, in theopen-sourceMS-DOSemulatorDOSBox and in theEFI shell.[4] In other environments, such asLinux andUnix, the same functionality is provided by theclear command.
The command is available inMS-DOS versions 2 (1983) and later.[5] While the ultimate origins of using the three-character stringCLS as the command to clear the screen likely predateMicrosoft's use, this command was present before its MS-DOS usage, in the embedded ROMBASIC dialects Microsoft wrote for early8-bitmicrocomputers (such asTRS-80Color BASIC), where it served the same purpose. The MS-DOS dialects of BASIC written by Microsoft,BASICA andGW-BASIC, also have theCLS command as a BASIC keyword - as do various non-Microsoft implementations of BASIC such asSinclair BASIC (1980), orBBC BASIC found on theBBC Micro computers (1981). TheCLS command is also present in BASIC versions for Microsoft Windows, however this generally clears text printed on the form, rather than the whole window or controls on the form.
The commandCLS has appeared as a clear screen command in many other BASIC dialects and command line interpreters, because of its familiarity through being included in MS-DOS.
The Software Link'sPC-MOS includes an implementation ofCLS.[6] Like the rest of the operating system, it is licensed under theGPL v3.[7]
DR DOS also includes an implementation of theCLS command.[8]