cygwin clearscreen from bash

Solution 1:

Or you could try ctrl-L :)

That should work in most emulated terminals as well.

Solution 2:

There is two ways:

Using shortcuts

Alt+F8 to clear screen and Ctrl-L to skip page

Using Clear alias

  1. Go to: cygwin\home\USER\.bashrc
  2. Open .bashrc file and put this alias alias clear='printf "\033c"'.
  3. restart your cygwin terminal.
  4. to clear your screen use clear command.

Solution 3:

If it's contained in your cygwin install (run Cygwin's setup and make sure you have the package called "ncurses"), try

tput clear

Solution 4:

I have this in my ~/.bashrc:

alias clear='printf "\033c"'

likewise, printf "\033c" clears the screen from within a bash script.