CLS (command)

From Wikipedia, the free encyclopedia
  (Redirected from Cls (command))
Jump to navigation Jump to search
Developer(s)DEC, Digital Research, Microsoft, ReactOS Contributors
Operating systemRT-11, DOS, FlexOS, OS/2, Microsoft Windows, ReactOS, SymbOS, DexOS

In computing, CLS (for clear screen) is a command used by the command line interpreters COMMAND.COM and cmd.exe on DOS, FlexOS,[1] IBM OS/2,[2] Microsoft Windows[3] and ReactOS operating systems to clear the screen or console window of commands and any output generated by them. It does not clear the user's history of commands, however. The command is also available in the DEC RT-11 operating system, in the open-source MS-DOS emulator DOSBox and in the EFI shell.[4] In other environments, such as Linux and Unix, the same functionality is provided by the clear command.


While the ultimate origins of using the three-character string CLS as the command to clear the screen likely predate Microsoft's use, this command was present before its MS-DOS usage, in the embedded ROM BASIC dialects Microsoft wrote for early 8-bit microcomputers (such as TRS-80 Color BASIC), where it served the same purpose. The MS-DOS dialects of BASIC written by Microsoft, BASICA and GW-BASIC, also have the CLS command as a BASIC keyword - as do various non-Microsoft implementations of BASIC such as BBC BASIC found on the BBC Micro computers. The CLS 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 command CLS 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.

See also[edit]


  1. ^
  2. ^
  3. ^ Microsoft TechNet Cls article
  4. ^ "EFI Shells and Scripting". Intel. Retrieved 2013-09-25.

Further reading[edit]