Under Linux, I can clear terminal output with a simple reset
from the command line. Under Cygwin, it appears reset
does not work:
I also tried reset 0
and reset 1
with no joy. And I even tried the native Windows' cls
command with no joy.
Cygwin appears to lack any useful documentation:
$ man -k reset
reset: nothing appropriate.
$ man -k terminal
terminal: nothing appropriate.
$ man reset 1
No manual entry for reset
No manual entry for 1
(Alternatively, what manual page do you want from section 1?)
How do I reset the terminal from the command line when using Cygwin? What is missing from the command above?
A bug report was filed with Cygwin for this issue: Bug 19195: The Cygwin terminal does not respond to either 'reset' or 'cls'.
Best Answer
Under Cygwin, it appears reset does not work
You are running a non Cygwin version of
reset
.You can confirm this by running
where reset
in a command prompt.Notes:
c:\windows\system32\reset.exe
is Remote Desktop Services Reset UtilityThe output you show in your question looks like it is from this version of reset (and not the Cygwin version).
Cygwin PATH setup
If you have installed the
ncurses
package (see below) then you need to make sure your CygwinPATH
has the Cygwin elements before the Windows elements (this should happen automatically when Cygwin is installed).Example cygwin path:
Cygwin reset
The Cygwin
reset
is part of thencurses
package and is linked totset
.Parameters to
tset
are optional.You can determine this is on your system using:
On my system:
Cygwin
clear
is also part ofncurses
. I havecls
aliased as follows:Notes:
You can always find out what packages contain particular cygwin commands using Search Packages.
clear
andreset
have slightly different behaviour:clear
clears the visible part of themintty
display. The scrollback buffer remains as is.reset
sends the terminal initialization string. In the case ofmintty
this clears the visible part of the display and removes the scrollback buffer.How do I check if ncurses is installed?
To see if a package is installed use
cygcheck -l ncurses
.-l package
- list contents of package (or all packages if none given)What is included in the ncurses package?
Source ncurses: Terminal display utilities (installed binaries and support files)