How to Install and Use Googler for Web Search in Ubuntu
Searching the web is an essential part of our daily routines. Most of us rely on web browsers like Google Chrome, Firefox, or Microsoft Edge to access search engines. However, what if you could search the web directly from your terminal? This is where Googler, a command-line utility, comes into play. Googler offers a fast, efficient, and distraction-free way to search Google directly from your Ubuntu terminal. This guide will walk you through the process of installing and using Googler on Ubuntu.
What is Googler?
Googler is a command-line tool that allows users to search Google from the terminal. It fetches and displays Google search results directly in your terminal. You can browse through search results, open them in your web browser, or even perform specific searches, such as searching for news or Google Scholar results.
Benefits of Using Googler
Using Googler offers several advantages:
- Speed: Googler is fast. You don’t need to wait for a web browser to load.
- Focus: There’s no distraction from ads or unrelated content, just pure search results.
- Customization: Googler allows you to tailor searches using various options and flags.
- Efficiency: For developers or command-line enthusiasts, it’s an efficient way to stay within the terminal environment.
Prerequisites
Before installing Googler, ensure your system meets these prerequisites:
- Ubuntu: This guide is focused on Ubuntu, but it should work on any Debian-based distribution.
- Terminal Access: Basic familiarity with the command line.
- Python: Googler is written in Python, so you need Python installed on your system.
Step 1: Update Your System
Before installing any new software, it’s always a good idea to update your system. This ensures that you have the latest packages and security updates. Open your terminal and type the following command:
sudo apt update && sudo apt upgrade -y
This command updates the package lists and upgrades all installed packages to their latest versions.
Step 2: Install Python
Googler is a Python-based tool, so you need Python installed on your system. Most Ubuntu installations come with Python pre-installed. You can check if Python is installed by running:
python3 --version
If Python is installed, this command will return the version number. If not, you can install Python using the following command:
sudo apt install python3 -y
Step 3: Install Googler
There are multiple ways to install Googler on Ubuntu. Below are the most common methods.
Method 1: Install via Ubuntu Repositories
Ubuntu’s default repositories may have Googler, but it might not be the latest version. To install Googler from the repositories, run:
sudo apt install googler -y
Method 2: Install via the PPA (Personal Package Archive)
Installing Googler via a PPA ensures that you get the latest version. To add the PPA and install Googler, use the following commands:
sudo add-apt-repository ppa:twodopeshaggy/jarun sudo apt update sudo apt install googler -y
This method ensures that you are installing the most recent version of Googler.
Method 3: Install from Source
If you prefer to have full control over the installation, you can install Googler from the source. Follow these steps:
- Clone the Repository: Clone the Googler repository from GitHub.
git clone https://github.com/jarun/googler.git
- Navigate to the Directory: Move to the Googler directory.
cd googler
- Install Googler: Run the installation script.
sudo make install
Step 4: Verify the Installation
After installing Googler, it’s essential to verify that it was installed correctly. You can check this by running:
googler -v
This command should return the version number of Googler, confirming that the installation was successful.
Step 5: Basic Usage of Googler
Now that you have Googler installed, let’s explore how to use it. Below are some basic commands and options you can use with Googler.
Basic Search
To perform a basic search, open your terminal and type:
googler search_term
Replace search_term
with your query. Googler will return a list of search results directly in your terminal.
Viewing More Results
By default, Googler displays 10 results per page. To view more results, press n
to go to the next page or p
to go to the previous page.
Opening a Search Result
Each search result is numbered. To open a result in your default web browser, type the number associated with the result and press Enter.
For example, if you want to open the second result, type:
2
Searching Specific Sites
If you want to search within a specific website, you can use the -w
flag:
googler -w example.com search_term
This command limits the search to the specified website.
Searching for News
Googler can also be used to search for news articles. To do this, use the -N
flag:
googler -N search_term
This will return news articles related to your search term.
Searching Google Scholar
If you are a researcher or student, you might find the Google Scholar search feature useful. To search Google Scholar, use the -S
flag:
googler -S search_term
This command will return scholarly articles related to your search term.
Customizing the Number of Results
You can customize the number of search results displayed by using the -n
flag followed by the desired number. For example:
googler -n 20 search_term
This command will display 20 results per page instead of the default 10.
Using Googler with Other Tools
Googler can be combined with other command-line tools to enhance its functionality. For example, you can pipe Googler’s output to less
for easier navigation:
googler search_term | less
Or you can use grep
to filter results:
googler search_term | grep "keyword"
Step 6: Advanced Googler Options
Googler offers a variety of advanced options that allow you to customize your search experience further. Here are a few worth exploring:
Language-Specific Searches
You can search for results in a specific language using the -l
flag:
googler -l en search_term
This command limits results to English-language websites.
Time-Specific Searches
To search within a specific time frame, use the -t
flag followed by the desired time frame (h
for hours, d
for days, m
for months):
googler -t 24h search_term
This command returns results from the last 24 hours.
Safe Search
If you want to enable safe search, use the --safe
flag:
googler --safe search_term
This command filters out explicit content from the search results.
Step 7: Uninstalling Googler
If you decide that Googler isn’t for you, uninstalling it is straightforward.
Uninstalling via APT
If you installed Googler via APT or a PPA, you can remove it using:
sudo apt remove googler -y
Uninstalling from Source
If you installed Googler from the source, navigate to the Googler directory and run:
sudo make uninstall
Conclusion
Googler is a powerful and efficient tool for searching the web directly from your Ubuntu terminal. It offers a wide range of features, from basic searches to advanced customization options. Whether you’re a developer, researcher, or command-line enthusiast, Googler can significantly enhance your productivity by streamlining your web search process.
By following this guide, you should now be able to install, configure, and use Googler effectively. So, why not give it a try and see how it fits into your workflow?
Now that you’re equipped with the knowledge to use Googler, you can enjoy fast, distraction-free searches directly from your terminal. Happy searching!
Thank you for reading the article! If you found the information useful, you can donate using the buttons below:
Donate ☕️ with PayPalDonate 💳 with Revolut