Need help with how2?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

5.4K Stars 176 Forks MIT License 143 Commits 38 Opened issues


stackoverflow from the terminal

Services available


Need anything else?

Contributors list

how2: stackoverflow from the terminal

NPM Version

how2 finds the simplest way to do something in a unix shell. It's like

, but you can query it in natural language:

Demo of using how2


You can install it via npm:

npm install -g how-2

if it gives you EACCES errors, you need to fix npm permissions. Or you can just use

sudo npm install -g how-2
if you don't care.


If you don't specify a language it defaults to Bash unix command line. how2 tries to give you immediately the most likely answer:

how2 unzip bz2

After that you can press SPACE to go to the interactive mode, where you can choose a different stackoverflow question/answer.

how2 interactive mode

how2 interactive mode 2

You can use

-l lang
to find answers for other languages:

-l python

Copy-Paste with mouse

When you are in "interactive mode" (after you press SPACE), if you want to copy-paste more than one line you can use block-select:

With Ubuntu try holding

before you select, or
if you're in iTerm on Mac.

(thanks to @danielkop for this suggestion).

Can i use it behind Proxy ?

Yes, you need to use

environment variables.

For example, you could alias the proxy seetings in your


alias how2="HTTPS_PROXY='your_proxy:8888' how2"

How does it work?

It uses Google and Stackoverflow APIs, because Stackoverflow search on its own doesn't works as well.


Because I can never remember how to do certain things. And reading man pages always takes too long.


Taken from

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.