Header Ads

How To Use StackOverflow Inside Your Terminal



Using StackOverflow to solve your doubts right from the terminal window is very easy. You need to download a small tool and use a simple syntax to search StackOverflow questions without leaving the world of the terminal. Go ahead and give it a try.
I
n our series of Linux Lexicon, we are continuously adding new articles to help you learn Linux from the scratch. In our articles covering the basic Linux commands, you would have come across the one telling you about man pages and their navigation. Each Linux command line program has its own documentation that’s listed in its man pages.
Man pages of Linux are limited to the operating system and you can access them anytime in your terminal. But, what to do if you want to get some specific answer related to some programming language or anything else? You’ll be opening your web browser and typing in the query to get the answer.
Install nodejs:



Install How2:



The above-mentioned steps will install How2 tool on your system.

Note: It’s possible that your Linux distribution makes use of nodejs instead of node. So, you need to make a symlink in order to make things work:
For installing How2 tool on your macOS terminal, you need to install node with brew using the following command:
Install How2 using the same Linux command as mentioned above.
Now, to use the tool, you can search StackOverflow by using how2 command followed by the desired query:
You’ll be getting the output screen on Mac something like this:
 
To get more options, you can press spacebar to launch the interactive mode to get a list of StackOverflow question/answers.
To get more information about this tool and its usage, you can head over to How2’s GitHub page.
Powered by Blogger.