Thursday, June 26, 2008

"bash: clear: command not found" --- clear not working on cygwin

Ok so you installed Cygwin and try out your first commands.... u cluttered ur screen and its time for doing a "clear".

Ooops... its giving you a "bash: clear: command not found". You just can't clear the dumb screen. I know thats frustrating....

So which dumb package did you miss when installing cygwin --- its the ncurses package. Open cygwin setup again and choose ncurses library from the "Lib" package. Once you've installed that, clear will start working.

If you are lazy enough and don't want to download stuff, just use "Ctrl+L" to clear your screen.


Keep clearing...

28 comments:

Anonymous said...

You write very well.

Azhad said...

Excellent article!

Atul Kumar said...

thanks a lot!!

Anonymous said...

Hells yeah, just what I was looking for :D
You rock!

Anonymous said...

It's been moved to the Utils package now.

Anonymous said...

Installed and uninstalled then reinstalled still doesnt work. not even "Ctrl+L" on the reinstall i installed the whole thing.

abhi.sanoujam said...

Its been some time now that I've used cygwin. By the somebody anonymous commented its been moved to the Utils package now (thx for the info). Have you tried that ?

Anonymous said...

I have installed all of the options of cygwin including the whole Utils package. it could just be my install. i installed it on another computer and the clear command works fine.

anonymous 12:26

Anonymous said...

If you have set bash to use 'vi' mode for editing the command line, using "set -o vi" in your .bash_profile, then Ctrl-L will stop working.

The solution is to create an .inputrc file in your home directory; here is an example:

$ cat .inputrc
set editing-mode vi
"\C-l": clear-screen

--
Dave

abhi.sanoujam said...

thanks for pointing that out dave. In fact I just wrote an entry about .inputrc yesterday -- http://abhisanoujam.blogspot.com/2009/06/bash-command-line-editing-custom.html . You can have even better mappings for moving your cursor backwards word by word etc, check out the post. You should be able to use that regardless of being in 'vi' mode or default emacs mode, just have the following in your inputrc file (just a sample for clear screen shortcut):

$ cat ~/.inputrc
"\C-l": clear-screen

Mallesh said...

thanks very much. It works for me

Anonymous said...

I did the NCURSES but even before then, the copy and paste did not work. Any ideas what I should look for? I can make this work from where I work, so there is something wrong with my configuration, but I do not know what it is.

Anonymous said...

thanks for the helpful post.

Anonymous said...

nice thanq u for giving nice answer

Anonymous said...

man i need your help i cannot run nam it says that it does nt understand the display something like this can you help

Anonymous said...

Thank you for the post, exactly what I needed!

Naresh said...

Thank you.. it was handy to learn this and the shortcut Ctrl +L too..

Anonymous said...

ctrl+L. That's the tip of the month for me. I've had this issue for like years. And too lazy to even google it...and now I'm too lazy to download anything. So ctrl L will be my best friend.

Anonymous said...

This was an awesome tutorial...just what i was lookin for ..thanx

Pradyumna said...

Thanks Ctrl+L works

Anonymous said...

This did help me. Thank you from Brazil.

Unknown said...

Did not know about CTRL-L. Thanks!

Unknown said...

-bash vi: command not found but i see vi folder created inside usr/share/locale any idea why vi is not working ? kindle help me !thank u :)

Anonymous said...

Great blog here! Also your web site loads up fast! What host are you using?

Can I get your affiliate link to your host? I wish my website loaded up as quickly as yours
lol

Review my webpage ... hudumaborainitiative.org

Anonymous said...

Great blog here! Also your website loads up very fast!
What web host are you using? Can I get your affiliate
link to your host? I wish my site loaded up as quickly as yours lol

My site 39330

Anonymous said...

Someone essentially assist to make significantly articles I would state.
This is the very first time I frequented your web page and thus far?
I surprised with the analysis you made to create this particular submit extraordinary.
Magnificent job!

Feel free to surf to my web page ... creative group

Anonymous said...

Hmm it seems like your website ate my first comment (it was extremely long) so I guess I'll just sum it up what I wrote and say, I'm thoroughly enjoying your blog.
I as well am an aspiring blog blogger but I'm still new to the whole thing. Do you have any recommendations for first-time blog writers? I'd certainly appreciate it.


My webpage: best registry cleaners

Anonymous said...

Thanks! you made my day!

Post a Comment