How to search for DuckDuckGo from the Linux terminal

0


[ad_1]

DuckDuckGo is a popular web search engine known for its strict privacy policies and functionality. Lately, he has gained popularity among privacy enthusiasts who have advocated his privacy-friendly research experience to others.


If you, too, use DuckDuckGo for all of your web searches and prefer to use the command line for most operations on your computer, ddgr is a useful utility that lets you use the terminal to make DuckDuckGo requests.

Below is a guide explaining ddgr and the steps to find DuckDuckGo from the Linux command line.


What is the ddgr?

ddgr is a command line tool that allows you to search for DuckDuckGo from the terminal. It returns the results in HTML format and you can browse them using your keyboard.

While the default ddgr interface uses minimal space without sacrificing readability, it does give you the ability to customize some of its aspects like string text, number of results displayed per page, etc. according to your preferences.

Some of the notable features of ddgr include:

VIDEO OF THE DAY MAKEUSE
  • Fast and instant processing of results

  • Easy navigation

  • Support for DuckDuckGo! Bang

  • Filtering search results by time, region, etc.

  • Browser integration

  • Support for HTTPS proxy

  • Do not follow

  • Minimum dependencies

  • REPL support for continuous searches

Related: Does HTTPS Protect Data In Transit?

How to install ddgr on Linux

It is quite easy to install and run ddgr on your Linux machine. And just like installing other programs on Linux, you can also install ddgr in various ways.

So depending on the distribution you are using, follow the instructions in the sections below to install ddgr.

Install ddgr on Debian / Ubuntu

Installing ddgr on Debian and its derivatives is easy, thanks to the APT package manager. To do this, open the terminal and run the following command:

sudo apt-get install ddgr

When prompted, tap Yes and hit Enter to continue the installation.

Another way to install ddgr on Debian-based Linux distributions, in addition to the APT package manager, is to use a DEB package file. To do this, first download the ddgr DEB package to your computer from the link below.


To download: ddgr (DEB package)

Once done, open the terminal and use the cd command to change the directory to Downloads (or the directory where you just downloaded the package).

Then run the following command to install the package:

sudo dpkg -i ddgr_x.x.x-x_ubuntuXX.XX.amd64.deb

Related: How to Install a DEB File in Ubuntu?

Installing ddgr using Snap

Snap offers one of the easiest ways to install a package on Linux. If you are using a Linux distribution – other than Debian or its derivatives – that does not have a package for ddgr in its repositories, you can install ddgr on your system using Snap.

To do this, first make sure that Snap is installed on your computer.

snap --version

If that returns a version number, Snap is present on your machine and you can proceed to the next step. If not, you will need to install Snap first.


Since you have successfully installed Snap on your device, you can install ddgr by running:

sudo snap install ddgr

How to use ddgr to find DuckDuckGo

Searching DuckDuckGo using ddgr is as easy as performing a few simple steps. First, open the terminal as this is where ddgr works. Then enter your search query in the syntax below to search for it on DuckDuckGo:

ddgr your_search_query

For example:

ddgr makeuseof

This is what the output looks like:



ddgr output

Configuring the number of returned results

Once you have made a query, the output will show a list of search results related to your search query.

By default, ddgr lists only 10 results at a time. However, you can choose to show more / less results at a time by explicitly mentioning the number of results you want to see as follows:

ddgr -n x your_search_query

…or X is the number of results you want to display.

Each ddgr result in the list is numbered. This number is called the index of a result, and you can use it to open the corresponding link.

For example, if you want to open the link number 5 from the results in a browser, simply enter 5 in the omnipresent – the prompt you see in the terminal after making a request in ddgr – and press Enter.

Integrate ddgr with text-based browsers

By default, ddgr opens links in the default web browser on your Linux machine. However, it also supports many text-based browsers, such as w3m, lynx, elinks, and www-browser, which you can use to open search results.

To set a default browser, all you need to do is set the corresponding environment variable. To do this, run the following command in a terminal window:


export BROWSER=w3m

Alternatively, if you want to use a browser for a particular query, you can do so using:

BROWSER=w3m ddgr your_search_query


ddgr in a text-based browser

Much like Google’s “I Feel Lucky” search, DuckDuckGo also has its own version of the same, called “I Feel Lucky”. In case you didn’t know, this option bypasses all results on the SERP and directly opens the first link in the list.

With ddgr, you can search for “I’m Feeling Ducky” using the following syntax:

ddgr -j lucky your_search_query

As mentioned earlier in the guide, ddgr also supports DuckDuckGo! Bang, which are shortcuts (or short commands) that allow you to search for your query directly on a website without having to visit it.


Suppose you want to learn more about DuckDuckGo on Wikipedia, you can do it easily by running the following command:

ddgr !w duckduckgo

If you are using the Bash shell, you will need to escape the ! character. If you do this, your command will look like this:

ddgr !w duckduckgo

Similar to using DuckDuckGo! Bangs in ddgr, you can also perform a website specific search using the -w label. For example, if you want to search for mechanical keyboards on Amazon, you can do it more efficiently by using the command below:

ddgr -w amazon.com mechanical keyboard

Find a specific file type

Sometimes you might just want to find a certain type of file on the Internet. In such cases, ddgr can help you filter your results by adding the file type in your search query.

For example, let’s say you want to search the DuckDuckGo search engine for image (PNG) files. With ddgr, you can do this as shown in the command below:


ddgr duckduckgo filetype:png

Getting help with ddgr

At any time, if you don’t know how to use a ddgr command or want to learn more, you can get command line help using:

ddgr --help


ddgr help

Search DuckDuckGo More Effectively

With ddgr installed and running on your Linux machine, you can now search DuckDuckGo more efficiently without ever having to open DuckDuckGo in a browser.

ddgr supports a bunch of other operations and customization options than what we’ve covered in this guide. To check them, go to ddgr’s GitHub.

Also, if you want to get the most out of your browsing experience, DuckDuckGo’s! Bang feature can be of help.


duckduckgo-bang-commands

25 Cool DuckDuckGo Bangs That Make Google Search Slow

DuckDuckGo’s bang feature is one of its most convenient and fastest tricks. Here are 25 useful DuckDuckGo bangs to get you started!

Read more


About the Author

[ad_2]

Share.

Comments are closed.