How To Search DuckDuckGo From Terminal Using ‘ddgr’?

In How to
If you talk
to a developer or sysadmin, you’ll realize the importance of
command line while working on a Unix-like operating system. In
many cases, command line interface lets you access the lower
levels of your machine. As a result, there is an abundance of Linux commands that you can use
to take control of your hardware and software installed on it.

From time to time, we keep sharing interesting Linux terminal tricks to make your overall
experience more fun. While working on a computer, one of the
primary tasks performed by us is surfing the web to gain
knowledge. For many of you, Google is the go-to destination
while performing the search on the web. However, if you’re
privacy-oriented, you need to use DuckDuckGo.

ddgr — Use DuckDuckGo from Linux terminal

In a previous article, we’ve already told you how to use a
popular tool named googler to perform Google searches from
the Linux command line. For DuckDuckGo, you can use ddgr cmdline
utility
, which I recently spotted on Reddit. It goes
without saying that this tool isn’t affiliated with
DuckDuckGo.

With this tool, you can specify the number of search results
you wish to see on a search page. “The default interface is
carefully designed to use minimum space without sacrificing
readability,” the GitHub page of ddgr states.

Its highlight features are:

  • Specify number of results per page
  • DuckDuckGo Bang support
  • Fast, clean, ad-free
  • Keywords support
  • HTTPS proxy support
  • Do Not Track
  • Non-stop searches
  • Control search by time, region
  • Disable safe searchfwe

How to install and use ddgr in Linux?

Before attempting to install ddgr tool, please note that it
requires Python 3.6 or later. To check your Python 3 version,
run the following command:

Having confirmed that you’re all set, run the following command
to install ddgr from a PPA on your Ubuntu distro or its
derivatives. On ddgr’s GitHub page, you can find the
instructions to install the same on other distros as well.

After installing ddgr tool to use DuckDuckGo from command line,
you’re ready to use it. To do so, run the following command:

Now, enter the search term to perform the action:

As you can see in the picture, the top DuckDuckGo results for
cydiadev are listed:

ddgr search terminalYou can directly
combine the above two arguments and perform search:

In case you wish to open the first result in browser, follow
this pattern;

ddgr duckduckgo open in browser

To search the contents of a site, follow this pattern and enter
search query when prompted:

ddgr site searchFor viewing the
complete URLs in search result, use -x:

To exit ddgr, hit double Enter or use q key. For help and
complete list of supported cmdline options, use help command:

ddgr helpYou can visit
ddgr’s GitHub page to know more information
and register your issues. Give it a try, use DuckDuckGo from
terminal, and share your views about the same.

Don’t forget to check a few more terminal tricks:

You may also read!

How To Download Faster In Google Chrome Using IDM-Like Parallel Downloading?

One upcoming feature in Google Chrome would excite many users is the support for parallel downloading. If you have

Read More...

Most Software Code Will Be Written By Machines By 2040, Researchers Predict

Imagine a scenario where a programmer needs to follow a couple of tried and tested procedures to write code

Read More...

Bitcoin Wallet ‘Phishing’ Attacks On The Rise As Bitcoin About To Lick $17,000

Who wouldn’t be willing to acquire the digital cryptocurrency which currently values at around $16,900? But some people prefer

Read More...

Mobile Sliding Menu