Search with Google in the terminal

Slashdot it! Delicious Share on Facebook Tweet! Digg!
rawpixel, 123RF

rawpixel, 123RF

Terminal Search

The Googler command-line tools let a user set numerous parameters for executing a target-oriented search in the terminal.

The word google is used as both a noun and a verb. Google is now accepted as a verb in standard English. Typically, Google searches are executed in a browser. The small tool Googler provides the user with an alternative that moves a Google search to the command line. Before dismissing the Googler approach as a silly gimmick, you should consider the advantages for certain users discussed here.

The command line has a reputation for being a mere relic of the past. Supposedly, there is no place among modern Linux distributions for such an archaic way of working. It may in fact be true that a modern Linux system can be operated entirely from the graphical interface and that this is a positive development. Even so, administrators and other computer workers place a great deal of value on working in the terminal. During the course of a long career, I have integrated both approaches according to the circumstances at hand. Googler is a perfect match for working in the terminal. I have been working with the program for several weeks now and am getting more and more enthusiastic about using it.

New Tool

Googler [1] is still a new tool that has not found an entry point into all distributions. A Debian package [2] exists for other Debian derivatives, such as Ubuntu and Linux Mint. Although Googler can be installed from the archive with Ubuntu, it is not available there in the current version 2.7.1. It is probably a good idea for you to use the current package. Once downloaded, it can be installed with dpkg -i googler_2.7-1_all.deb and modified as appropriate. Googler can also be installed directly from the Git archive (Listing 1).

Listing 1

Installing Googler

$ cd /tmp
$ git clone https://github.com/jarun/googler/
$ cd googler
$ sudo make install
$ cd auto-completion/bash/
$ sudo cp googler-completion.bash /etc/bash_completion.d/

Ready to use

The last two commands make sure that auto complete is useable. When installed via the package management, the application gets updated at the same time. When installing from Git, the command

sudo googler -U

pulls in an updated version. Googler can also be started directly from the folder, thus without being installed. To do this, enter ./googler . The coloration for the output is subdued, but it can be modified with the color codes found on GitHub under the heading Colors [3].

Googler gets along without a configuration file. Specifying a particular default setting works via an alias. These can be set up in the .bashrc file in the home directory, or otherwise universally for all users in /etc/bash.bashrc . For example, if you enter the line

alias g='googler -n 5 -c en -l com'

at the end of these files and then also enter the

g <search term>

on the command line, you will get the first five English language references for the top-level .com domain.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content