How To Search On Linux Terminal From Google : Googler

In a life of Linux administrator, there always a time comes when he needs to setup a server and sometimes Linux admin needs to look for few command or need to search but can’t go out onto the browser and you used to make wish OH God! please this would be so great if I could google on my terminal.

Well here is the key to saves you and now you can google on Linux terminal and you don’t need to search on a browser like a firefox or chrome and this tool is known as Googler!

Let’s know about Googler

Here are the facts:

    1. Googler is a command line utility and you can google from your terminal window
    2. Googler supports three type of search only
      • Simple Google search just like you do on Google home page
      • It Support Google news search
      • Supports Google search on a specific site
    3. Till date, it’s for Ubuntu only 🙁

Let’s Start the installation of Googler on Ubuntu

Scenario: My Server IP is 192.168.1.21
OS: Ubuntu 14.0 LTS

Step 1: Install Python or Upgrade

For installation, Googler requires python version 3.3 or above. I suggest updating your system and then check your python version.

#sudo apt-get update

Now cheek for python version by using command

#python --version
#python3 --version

if still, you have a lower version then upgrade you python manually


Step 2: Install GIT and Clone Googler

We need git package to clone Googler from GitHub repository and we do all work of compilation in a temp dir. Googler still not in available through package repository of Ubuntu. Now follow the following commands

#cd /tmp
#git clone https://github.com/jarun/googler.git
#cd googler

Step 3: Compile Googler

Now we will compile Googler on our Ubuntu machine with simple commands.

#sudo make install
#cd auto-completion/bash/
#sudo cp googler-completion.bash /etc/bash_completion.d/

With these commands, you have successfully installed Googler on you Ubuntu machine

Step4: Checking Installation

You can check the installation with a small search with typing following command

#cd /tmp/gooogler
#./googler

Now type in your query string like https://kapendra.com and hit enter. You must see the result like this image.

Search On Linux Terminal From Google

Learn How To Use Googler

With above example, you can see the search result now if you want to read more about any link then you need to press the search number like 1 or 5 or 3.

Now Let’s learn about some basic search methods

  1. Search A News: Now you are willing to search any article in news section then use ‘-N’ argument and you will be prompt with the news. Check out following command.
    #./googler -N

    Soon after this command enter your search string and your News will be there.

  2. Search With In A Site: Now guess you want to search inside a site only like kapendra.com. Then run the Googler with ‘-w’ argument like below:
    #./googler -w kapendra.com

    Now enter your search string and it will show the result for your keyword from kapendra.com website only.

  3. Google Search In A specific Country: To do this you need to use ‘-c' argument with country domain code like in or uk and Googler will look out for you from that specific country. Use following command
    .#/googler -c in "LAMP"

    The Command shown above used IN as argument option and this will show result for LAMP from Google’s Indian domain

Well, there are lots of things which you can do with Googler like integrating Googler with the text based browser like elinks etc. and much more. You may explore this tool by going through it man pages. To access man pages for Googler use the following command:

# man googler

 

Watch Video:

 

Hope You like this tutorial!