Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.


How to add the power of DuckDuckGo to your Linux terminal

If you're a Linux user looking to make your desktop a bit more efficient, ddgr is a tool that can help you.
Written by Jack Wallen, Contributing Writer
woman working on computer
Getty Images/pixdeluxe

Even though I know I can do everything I need to with a GUI in Linux, I still opt to take advantage of the power, flexibility, and efficiency of the terminal window. Because of that, I like to add a little tool called ddgr into the mix.

Ddgr makes it possible to run a DuckDuckGo search from the Linux terminal window. Because DuckDuckGo is more privacy-focused than Google, I prefer to use this tool (over Googler) for terminal-based searches. When you run a search through ddgr, it will present links you can select that will open in your default browser. 

Also: Best secure browsers for privacy

I know, I know…you're thinking, "Why not just run the search through your browser?" To be honest, other than it being kind of cool and fun, it could have bash script and application implications. But mostly, it's just a quick and fun way to run searches from the command line and then open the results in your browser. 

Let me first show you how to install ddgr and then I'll demonstrate a few sample searches.

How to install ddgr

What you'll need: To install ddgr, you'll only need a running instance of Linux (it doesn't matter what distribution) and a user with sudo privileges -- that's it. Let's install.

1. Open a terminal window

The first thing to do is log in to your desktop and open a terminal window. 

2. Install make and unzip

No matter what Linux distribution you're using, you should be able to install ddgr, but first you must install the make tool with one of the following commands:

  • On a Fedora-based distribution: sudo dnf install make unzip -y
  • On a Ubuntu-based distribution: sudo apt-get install build-essential unzip -y

3. Download the source

Download the ddgr source with the following command:

wget https://github.com/jarun/ddgr/archive/refs/tags/v2.1.zip

Make sure to visit the official ddgr release page to make sure you're downloading the latest version.

4. Extract the file

Unpack the compressed file with the command:

unzip v2.1.zip

Make sure you replace 2.1 with the version you downloaded.

5. Install ddgr

Change into the newly created directory with cd ddgr-2.1 (make sure to replace 2.1 with the version you downloaded) and then install ddgr with:

sudo make install

How to use ddgr

Now that ddgr is installed, it's ready to be used. Here's a few examples of what you can do. One thing to keep in mind is that, when you run the ddgr command, you don't get your prompt returned. 

Also: How to install Ubuntu Linux (It's easy!)

Because of that approach, you can issue another search without having to type ddgr first. To exit the ddgr console, type q and hit Enter on your keyboard.

1. A basic search

You can issue a very basic search with ddgr. For example, to search for Linux on DuckDuckGo, issue the command:

ddgr Linux

The output will list the top 10 results. If you see a link you want to visit, click on it, and the link will open in your browser.

2. Search a site

Let's say you want to search ZDNET for Linux content. For that, you could issue the command:

ddgr -w zdnet.com Linux

The output will be Linux-related articles from ZDNET.

3. Bangs 

I'm not talking about your hair. Ddgr also supports bangs. Bangs are shortcuts for supporting sites. For example, the !ubuntuf bang is for the Ubuntu Forums. !zdnet is for ZDNET. So you could search my name on ZDNET with the bang:

ddgr \!zdnet jack wallen

It's important to note that you do have to place the backslash before the ! (bang), otherwise the command will not work.

You can find different ways to use ddgr on the official site.

Also: How to get started with Git on Linux

And that's all there is to adding a powerful DuckDuckGo-based search command to the Linux terminal. When you consistently have a terminal window open, this is a great way to search.

Editorial standards