{{Short description|Microsoft command to clear the screen}} {{Infobox software | 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<br />ReactOS: GPL v2 | website = }} In computing, '''<code>CLS</code>''' (for '''cl'''ear '''s'''creen) is a command used by the command-line interpreters <code>COMMAND.COM</code> and <code>cmd.exe</code> on DOS, Digital Research FlexOS,<ref>{{Cite web |date=November 1986 |title=FlexOS™ User's Guide Version 1.3 |url=http://bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf |url-status=dead |archive-url=https://web.archive.org/web/20190925131719/http://bitsavers.org/pdf/digitalResearch/flexos/1073-2003_FlexOS_Users_Guide_V1.3_Nov86.pdf |archive-date=September 25, 2019 |access-date=October 25, 2025}}</ref> IBM OS/2,<ref>{{Cite web |url=http://www.jatomes.com/Help/Os2Cmd.php#CLS |title=JaTomes Help - OS/2 Commands |access-date=2019-07-06 |archive-date=2019-04-14 |archive-url=https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php#CLS |url-status=dead }}</ref> Microsoft Windows<ref>[https://technet.microsoft.com/en-us/library/bb490879.aspx Microsoft TechNet Cls article]</ref> 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.<ref name="EFI-Shells-and-Scripting">{{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 }}</ref> In other environments, such as Linux and Unix, the same functionality is provided by the <code>clear</code> command.
==History== The command is available in MS-DOS versions 2 (1983) and later.<ref name="RUNNINGMSDOS">{{Cite book|author-last=Wolverton|author-first=Van|title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition|date=2003|publisher=Microsoft Press|isbn=0-7356-1812-7}}</ref> While the ultimate origins of using the three-character string <code>CLS</code> 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 <code>CLS</code> 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 <code>CLS</code> 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 <code>CLS</code> 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 <code>CLS</code>.<ref>[https://github.com/roelandjansen/pcmos386v501/blob/master/DOCS/v4/PCMOSv4UserManual.pdf PC-MOS User Guide]</ref> Like the rest of the operating system, it is licensed under the GPL v3.<ref>{{cite web|url=https://github.com/roelandjansen/pcmos386v501|title=pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources|first=Roeland|last=Jansen|date=8 February 2018|via=GitHub}}</ref>
DR DOS also includes an implementation of the {{code|CLS}} command.<ref name="drdos6userguide">{{Cite web |url=https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf |title=DR DOS 6.0 User Guide Optimisation and Configuration Tips |access-date=2019-08-13 |archive-url=https://web.archive.org/web/20190930135943/http://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf |archive-date=2019-09-30 |url-status=dead }}</ref>
==See also== *CLS (CONFIG.SYS directive) *List of DOS commands
==References== {{Reflist}}
==Further reading== *{{Cite book|author-last=Wolverton|author-first=Van|title=MS-DOS Commands: Microsoft Quick Reference, 4th Revised edition|url=https://archive.org/details/msdos00wolv|url-access=registration|date=1990|publisher=Microsoft Press|isbn=978-1556152894}} *{{Cite book|author1=Kathy Ivens|author2=Brian Proffit|year=1993|title=OS/2 Inside & Out|publisher=Osborne McGraw-Hill|isbn=978-0078818714}} *{{Cite book|first=Æleen|last=Frisch|year=2001|title=Windows 2000 Commands Pocket Reference|publisher=O'Reilly|isbn=978-0-596-00148-3}}
==External links== {{Wikibooks|Guide to Windows Commands}} *[https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cls cls | Microsoft Docs]
{{Windows commands}}
Category:Internal DOS commands Category:MSX-DOS commands Category:OS/2 commands Category:ReactOS commands Category:Windows commands