Learn the search power tool Googler to search keywords on Google from the Linux terminal. The text-based search tool works on all Linux distros.
One of the most visited sites by IT people is Google! Sample code, syntax, errors, solutions, tutorials, howtos we search all these things on Google every day. No one knows everything! No one can deny that he/she never used Google! So it’s an inseparable part of digital life.
What if you could Google right from your Linux terminal! Sounds crazy! Obviously Googling in text mode won’t be that easy-to-use experience but yes for Linux lovers its fascinating and must-do experience.
In this article, we will walk you through how to Google in Linux terminal.
Googler is a tool that provides the capability to search on Google from the Linux terminal. We will see how to install Googler and how to use Googler to search from the Linux terminal.
Googler is a command-line utility originally started by Henri Hakkinen and now taken forward by Arun Jana. Its GIT repo is maintained here. When searched, it shows results with title, link, and excerpt in terminal window.
Take a look of Googler in action :
How to install Googler
The Googler uses Python and the latest release needs Python 3 or later to run. Install Python 3 on your system if you don’t have it.
After a successful package installation, you will be able to run
googler command. If you want to compile it on your system using source code then source code is available here.
How to use Googler
Googler has many options to search and interact with results. For simple search you just supply keyword and it will show you the first 10 search results the same as Google website do when you search keyword from browser.
Output is color coded for easy reading and identification where –
- Green for titles
- Yellow for links
- cyan for indices and link metadata like published date etc.
- Normal for link description
See above screenshot where you can see simple keyword search in
googler and the color scheme.
If you run
googler command without any argument it asks for a keyword or offers help via
root@kerneltalks # googler Please initiate a query. googler (? for help) ? omniprompt keys: n, p fetch the next or previous set of search results index open the result corresponding to index in browser f jump to the first page o [index|range|a ...] open space-separated result indices, numeric ranges (sitelinks unsupported in ranges), or all, in browser open the current search in browser, if no arguments O [index|range|a ...] like key 'o', but try to open in a GUI browser g keywords new Google search for 'keywords' with original options should be used to search omniprompt keys and indices q, ^D, double Enter exit googler ? show omniprompt help * other inputs issue a new search with original options
Here are few searches you can try with Googler :
Search within news for keyword
# googler -N Linux
Search on specific website
# googler -w kerneltalks.com nfs
Search specific filetype
# googler linux tutorial filetype:pdf
Many options to explore and use. Check googler manpage using
man googler or help using
googler -h !!
Enjoy! Happy Googling from Terminal!