DuckDuckGo is one of the most private search engines available to use on any web browser. It does not track you in any manner (unless you use the DuckDuckGo browser) and gives you just the result of your query (unlike Google, which gives you a search result based on your history).
You still have to open a Web browser in order to search anything, however, there is a command line tool named ‘ddgr’ through which, you can search the web directly from your Terminal.
In this tutorial, we will install ddgr and will take a look at some features and practical usage of this tool.
Features of DDGR
- Completely ad-free.
- Because you are not opening any web browser, the search is super fast.
- You can open any hyperlink in your preferred web browser.
- You can add custom filters to the search results
- Do Not Track requests can be set as well as it has HTTPS proxy support.
- It also has keyword support.
- The project has good documentation.
Installing ddgr
It has a Python3.7+ dependency, so first, make sure it is installed on your distribution. Now, clone the GitHub repository by typing the commands mentioned below:
git clone https://github.com/jarun/ddgr
cd ddgr
Now, you can either run this program locally without installing or you can install it on your system. To run locally, type :
./ddgr
And then enter your search string.
You can install the application by typing :
sudo make install
Searching with DuckDuckGo in the Terminal
Using this utility is really simple, just type :
ddgr -x SEARCH TERM
Here, -x flag will give you the links to the website along with the search results, you can press the shift key and then click on the URL to open it in a Web Browser.
You can also search through any website using the -w option. Type :
ddgr -xw amazon.in Linux Bible
You can also add an alias for this tool, so you won’t have to type out everything with flags.
alias ddgr="ddgr -x"
You can read more about Terminal Aliases here.
Summary
This is a really powerful tool with a lot of options to play with. It also works with DuckDuckGo bangs, so if you play around with your aliases, you won’t have to open a web browser ever again in order to search for simple things.