How to run a Google search from the Linux command line

Having the ability to Google from the command line can be an efficient way to look up something on Linux. Jack Wallen shows you how with the help of Googler.

Run a Google search from the Linux command line with Googler

The majority of people depend on Google as a search engine. We use it every day to find the necessary information to keep us in the know. When you want to Google something, you either reach for your phone or open a browser. 

SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)

But if you're a Linux user, you might want a faster way of doing so (because efficiency is the name of the game). So what if I told you it's possible to perform a google search from the command line? It's not only possible, it's easy. 

Now, before we get into this, know that the application I'm going to show only presents the search results and requires a default web browser to open the results. So, although you can issue your initial search within the command line, clicking a link will take you out of the command line and into a GUI application. However, having a Google like this around does have implications for bash scripts and other command line utilities. 

With that said, let's install the latest version of Googler and see how it's used. 

To install Googler, open a terminal window and download the latest version with 

wget https://raw.githubusercontent.com/jarun/googler/v4.3.2/googler. 

Once you have the application downloaded, move it with 

sudo mv googler /usr/local/bin/. 

Finally, give the script executable permissions with 

sudo chmod +x /usr/local/bin/googler. 

Googler is ready to go. 

To use the app, simply type googler STRING (where STRING is what you want to google). 

For example, if you want to google TechRepublic, you'd type 

googler techrepublic. 

If you see a result that interests you, click on the link to open your default browser. You can get more specific with your searches as well. Say you want to search TechRepublic for Linux content, that command would be 

googler -w techrepublic.com linux. 

The results would only show Linux-related content. 

And that's how you can google from the Linux command line. Enjoy this handy and efficient tool.

Subscribe to TechRepublic's How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

Also see

linux.jpg

Image: Zhanna Hapanovich/Shutterstock

By Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic, The New Stack, and Linux New Media. He's covered a variety of topics for over twenty years and is an avid promoter of open source. For more news about Jack Wallen, visit his website jackwallen....