Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the 'clear' command in Cygwin?

Tags:

cygwin

ncurses

People also ask

Where is the clear command?

Type "cls" and then press the "Enter" key. This is the clear command and, when it is entered, all of your previous commands in the window are cleared.

What is the command for clear?

In Command Prompt, type: cls and press Enter. Doing this clears the entire application screen. Close and reopen Command Prompt.

What command is used to clear up the terminal window?

From the Windows command line or MS-DOS, you can clear the screen and all commands using the CLS command.


Install the Cygwin package ncurses; it is in the Utils category.


This should do:

alias clear='printf "\033c"'

just use this shortcut: Alt+F8 and Ctrl-L to skip page


Use cygcheck command to check what package it is in (adding .exe to your cmd string, in this example: clear.exe)

> cygcheck -p 'clear.exe'
Found 4 matches for clear.exe
ncurses-debuginfo-5.9-20150307-1 - ncurses-debuginfo: Debug info for ncurses (installed binaries and support files)
ncurses-debuginfo-5.9-20150404-1 - ncurses-debuginfo: Debug info for ncurses (installed binaries and support files)
ncurses-5.9-20150307-1 - ncurses: Terminal display utilities (installed binaries and support files)
ncurses-5.9-20150404-1 - ncurses: Terminal display utilities (installed binaries and support files)

and you know you have to install ncurses package using cygwin installer.