Learn search power tool Googler to search keywords on Google from Linux terminal. Text based search tool works on all Linux distros.
One of the most visited site by IT person is Google! Sample code, syntax, errors, solutions, tutorials, howtos we search all these things on Google everyday. No one knows everything! No one can deny that he/she never used Google! So its inseparable part of digital life.
What if you could Google right from your Linux terminal! Sounds crazy! Obviously Googling in text mode wont 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 which provides capability to search on Google from Linux terminal. We will see how to install Googler and how to use Googler to search from Linux terminal.
Googler is 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
Googler uses Python and latest release needs Python 3 or later to run. Install Python 3 on your system if you dont have it.
Now download ready packages for deployment according to your package manager.
After successful package installation you will be able to run
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 first 10 search results 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 color scheme.
If you run
googler command without any argument it asks for keyword or offers help via ?
root@kerneltalks # googler
Please initiate a query.
googler (? for help) ?
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 explorer and use. Check googler manpage using
man googler or help using
googler -h !!
Enjoy! Happy Googling from Terminal!