There exist a number of command line Linux utilities that you can use to search Wikipedia and get useful information. Some of these provide crisp summaries of articles and save your time. In case you’re a heavy WhatsApp user and you belong to India, you can also use this Wikipedia bot.
Some other terminal tricks that you will ❤️ :
- Watch Star Wars in terminal
- Use StackOverflow in terminal
- Get Weather report in terminal
- Access Google through terminal
- Search and download torrent in terminal
Having said that, let’s tell you some simple ways to get your answers instantly and quench your thirst for knowledge:
Command line Wikipedia search using Wikit
Wikit command line program is my personal favorite way to get a summary of search topics from Wikipedia in the command line in no time. Here’s the GitHub link of Wikit.
According to Urban Dictionary, Wikit’s literal meaning is the act of looking up for something at Wikipedia.
First and foremost, you need to install Node.js on your machine. To do so on your Ubuntu, Debian, or Mint systems, run the following command:
sudo apt-get install nodejs
sudo apt-get install npm
For other distros, use yum, pacman, or dnf package manager.
After installing Node.js, you need to run a simple command to install Wikit on your computer for using Wikipedia in terminal. Here’s how I did it on my Ubuntu machine:
sudo npm install wikit -g
Once you’ve installed Wikit, using it to get Wikipedia summaries is pretty easy. Simply run the following command with your search query. Note that multi-word queries are also accepted and you don’t need to include quotes.
wikit <search query>
wikit <query> [-flags]
Here are the flags that you can use:
- -b : Opens full Wikipedia article in browser.
- -lang langCode : Specifies language; langCode is an HTML ISO language code.
- –line num : Sets line wrap length to num (minimum 15)
- -d : Opens disambiguation page in browser.
You can also get complete information on Wikit by simply running following command:
wikit -lang ja linux
wikit -b manjaro
I hope that you would’ve loved learning about Wikit command which lets you use Wikipedia in Terminal. In case you know about some more cool terminal tools that can make the lives of fellow Fossbytes readers more interesting, don’t forget to share them with me.