Have you ever wanted to search the Web while typing away on the command line? It can be kind of annoying when you need to search for something and have to open another app to do so. Luckily, there are a few Linux apps that let you search the Web from Terminal. Let’s take a look.
Also read: How to Do Spelling Checks in the Linux Terminal
ddgr – Search the Web with DuckDuckGo
This command-line tool works with DuckDuckGo over the Tor network. It’s the perfect choice if you want to maintain your privacy while browsing online.
Installing ddgr
To install ddgr, you will first need to install Python3.5 or later. In addition, you will need to install either xsel
, xclip
or termux-clipboard-set
. You can usually find these in your Linux distribution’s package manager.
After getting these dependencies installed, the easiest method of installation is probably installing the standalone version. To do this, first Git clone the ddgr repository with:
git clone https://github.com/jarun/ddgr.git
Then copy the ddgr executable file to your system $PATH. To do this, run the following command:
sudo cp ddgr /usr/local/bin
You can then simply use the following to run ddgr:
ddgr
Using ddgr
Searching is super easy with ddgr. To get started, simply type your search term after ddgr
to do a quick search.
You can open any page in your web browser by typing the corresponding index number. In addition, you can open the next page of search results by typing the letter n and hitting Enter. To view the previous page of results, type p. If you want to go to the first page of results from any page, simply type f and hit Enter.
This is a useful app, and you should definitely check out the application’s Github page to see what’s possible with the full feature set.
Googler
Google is the top search engine used today, and it is familiar to many of us. You can use Googler to search Google directly from the command line. One thing I really love about Googler is that it serves up search results without ads!
Installing Googler
Similarly, you’ll need to have Python 3.5, xsel
, xclip
, or termix-clipboard-set
installed in order to be able to copy URLs to the clipboard. These packages can be installed from your distribution’s package manager if they aren’t already.
The easiest way to install Googler is as follows:
sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jarun/googler/v4.0/googler sudo chmod +x /usr/local/bin/googler
Using Googler
Using Googler is as straightforward as ddgr. To search for something, simply type googler
followed by your search term. For example, if I wanted to see what Make Tech Easier had to say about Linux, I would type the following:
googler Make Tech Easier Linux
If you want to open a specific result, simply type the number that corresponds to the search result and hit enter. To advance the search results page forward, type n and hit Enter. To go back, type p. If you want to go to the first search results page for a particular search term, type f and hit Enter.
It’s neat that you can do these things directly from the command line. You can also find out more on what Googler can offer here.
Being able to search the Web from the terminal is a godsend for those who are always working in the terminal. If you want more privacy, then ddgr, which returns search results from DuckDuckGo, is the way to go. On the other hand, if you prefer Google, then you’ll want to choose Googler.
Our latest tutorials delivered straight to your inbox