What if you are on your Linux terminal, executing some commands, and you need to google something without leaving the terminal? Is it possible to perform the internet search right from your terminal?
With Linux, everything is possible. You can google from the Linux terminal and enjoy the lovely terminal dark background. What more, you can even send the results from your terminal directly to your browser.
To make this possible, we shall use Googler. This genius command-line tool to google anything right from your Linux terminal window. Not just that, you can search Google News, and search for any specific website too.
If you are a terminal geek who loves to do everything with commands, then definitely this article is for you.
Pre-requisite
Before installing the Googler tool on your Linux, you need to make sure that the current installed Python version is 3.5 or later. Use the following command to check your current installed Python version on Ubuntu.
python3 --version
![Check Python Package Version](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/Check-Python-Package-Version.png?lossy=2&strip=1&webp=1)
Check Python Package Version
As you can see in our case, the Python version is 3.6, so you can move forward. If you have Python with version less than the recommended one, all you need to do is to upgrade Python to meet the installation requirements.
Installing Googler
Step 1. To install the tool:
- On Fedora:
dnf install googler
- On Debian:
apt-get install googler
- On openSUSE:
zypper in googler
- On FreeBSD:
pkg install googler
- On Ubuntu:
apt install googler
![Install Googler Package](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/Install-Googler-Package.png?lossy=2&strip=1&webp=1)
Install Googler Package
Step 2. Check the current Googler’s version to make sure that it is installed successfully.
googler --version
![Check The Googler Installed Version](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/Check-The-Googler-Installed-Version.png?lossy=2&strip=1&webp=1)
Version Check
Step 3. Check if there is a new Googler version by letting the tool upgrade itself using the following command.
sudo googler -u
![Let Googler To Upgrade Itself](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/Let-Googler-To-Upgrade-Itself.png?lossy=2&strip=1&webp=1)
Upgrade
Step 4. Check the Googler’s new version.
googler --version
![New Googler Version](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/New-Googler-Version.png?lossy=2&strip=1&webp=1)
New Googler Version
Googler Usage Examples
Step 1. You can have a look at the Googler “help” option to know more about how to use it.
googler --help
![Check The Googler Help Option](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/Check-The-Googler-Help-Option.png?lossy=2&strip=1&webp=1)
Check The Googler Help Option
Step 2. Now let’s assume you need to search a specific website. For example, let’s search for all the Ubuntu articles on the “fosslinux” website.
googler -w fosslinux.com ubuntu
![Search Website For Certain Results](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/Search-Website-For-Certain-Results.png?lossy=2&strip=1&webp=1)
Search Website For Certain Results
Step 3. Assume you need to get only a certain number of results with a specific time. For example, search the “fosslinux” website for all the Ubuntu articles in the last two months and display only the first three articles.
googler -n 3 -t m2 -w fosslinux.com ubuntu
![Get The First 3 Results In The Past 2 Months](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/Get-The-First-3-Results-In-The-Past-2-Months.png?lossy=2&strip=1&webp=1)
Get The First 3 Results In The Past 2 Months
Step 4. To search Google directly:
googler ubuntu
![Search Google For Specific Keyword](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2019/12/Search-Google-For-Specific-Keyword.png?lossy=2&strip=1&webp=1)
Search Google For Specific Keyword
That’s all about Google search within the Linux Terminal.