CLS (command)


title: "CLS (command)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["internal-dos-commands", "msx-dos-commands", "os/2-commands", "reactos-commands", "windows-commands"] topic_path: "technology/operating-systems" source: "https://en.wikipedia.org/wiki/CLS_(command)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::data[format=table title="Infobox software"]

FieldValue
namecls
developerDEC, Microsoft, IBM, TSL, DR, Novell, Toshiba, ReactOS Contributors
operating systemRT-11, DOS, MSX-DOS, FlexOS, PC-MOS, SISNE plus, OS/2, Windows, ReactOS, SymbOS, DexOS
platformCross-platform
genreCommand
licensePC-MOS: GPL v3
ReactOS: GPL v2
::

| name = cls | logo = | screenshot = | screenshot size = | caption = | developer = DEC, Microsoft, IBM, TSL, DR, Novell, Toshiba, ReactOS Contributors | released = | latest release version = | latest release date = | operating system = RT-11, DOS, MSX-DOS, FlexOS, PC-MOS, SISNE plus, OS/2, Windows, ReactOS, SymbOS, DexOS | platform = Cross-platform | genre = Command | license = PC-MOS: GPL v3 ReactOS: GPL v2 | website = In computing, CLS (for clear screen) is a command used by the command-line interpreters [COMMAND.COM](command-com) and [cmd.exe](cmd-exe) on DOS, Digital Research FlexOS, IBM OS/2, Microsoft Windows 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.{{cite web | url = http://software.intel.com/en-us/articles/efi-shells-and-scripting/ | title = EFI Shells and Scripting | publisher = Intel | access-date = 2013-09-25

History

The command is available in MS-DOS versions 2 (1983) and later. 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 Sinclair BASIC (1980), or BBC BASIC found on the BBC Micro computers (1981). 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.

The Software Link's PC-MOS includes an implementation of CLS. Like the rest of the operating system, it is licensed under the GPL v3.

DR DOS also includes an implementation of the command.

References

References

  1. (November 1986). "FlexOS™ User's Guide Version 1.3".
  2. "JaTomes Help - OS/2 Commands".
  3. [https://technet.microsoft.com/en-us/library/bb490879.aspx Microsoft TechNet Cls article]
  4. (2003). "Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition". [[Microsoft Press]].
  5. [https://github.com/roelandjansen/pcmos386v501/blob/master/DOCS/v4/PCMOSv4UserManual.pdf PC-MOS User Guide]
  6. Jansen, Roeland. (8 February 2018). "pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources".
  7. "DR DOS 6.0 User Guide Optimisation and Configuration Tips".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

internal-dos-commandsmsx-dos-commandsos/2-commandsreactos-commandswindows-commands