How to Search the Web from Linux Terminal
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.
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.
To install ddgr, you will first need to install Python3.5 or later. In addition, you will need to install either
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:
Then copy the ddgr executable file to your system $PATH. To do this, run the following command:
You can then simply use the following to run 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.
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!
Similarly, you’ll need to have Python 3.5,
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:
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:
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.