How to Search DuckDuckGo from the Linux Terminal?

DuckDuckGo is a privacy-focused search engine that doesn't track users or collect personal information. While most users access it through a web browser, Linux users can search DuckDuckGo directly from the terminal using command-line tools, eliminating the need to open a browser for quick searches.

This approach is particularly useful for system administrators, developers, and terminal enthusiasts who prefer staying in the command-line environment while performing web searches.

Installing DDGR

DDGR (DuckDuckGo from the terminal using Python) is a command-line tool that provides terminal access to DuckDuckGo search functionality. It displays search results directly in your terminal with titles, URLs, and descriptions.

Installation on Different Linux Distributions

For Ubuntu/Debian-based systems

sudo apt-get install python3-pip
sudo pip3 install ddgr

For Fedora/RHEL systems

sudo dnf install python3-pip
sudo pip3 install ddgr

For Arch Linux systems

sudo pacman -S python-pip
sudo pip install ddgr

Basic Usage

The basic syntax for using DDGR is

ddgr [options] query

To search for "linux tutorial" on DuckDuckGo

ddgr linux tutorial
1. Linux Tutorial - A Beginner's Guide to Get Started - Guru99
https://www.guru99.com/linux-tutorial.html
In this Linux tutorial, we will learn: The basic concepts of Linux. Introduction to the Linux operating system.

2. Learn Linux - Free Interactive Online Tutorial
https://www.learnshell.org/
Learn Linux commands interactively through the web browser. A list of the most commonly used Linux commands.

3. How to Install Linux (with Pictures) - wikiHow
https://www.wikihow.com/Install-Linux
How to Install Linux. Linux is an open-source operating system that has been around for many years and is widely used for servers and supercomputers.

4. Learn Linux in a Month of Lunches - Manning Publications
https://www.manning.com/books/learn-linux-in-a-month-of-lunches
Learn Linux in a Month of Lunches is a tutorial designed to take you from novice to Linux command line guru in just 22 lessons.

Advanced Search Options

Image Search

To search for images related to your query, use the -i option

ddgr -i linux

News Search

To search specifically for news articles, use the -n option

ddgr -n linux security

Wikipedia Search

To search Wikipedia directly through DuckDuckGo, use the -w option

ddgr -w linux kernel

Disabling Safe Search

By default, DDGR uses DuckDuckGo's Safe Search feature. To disable content filtering, use the --unsafe option

ddgr --unsafe search term

Common DDGR Options

Option Description
-n Search for news articles
-i Search for images
-w Search Wikipedia
--unsafe Disable Safe Search filtering
-r REGION Search from a specific region
-l LANG Search in a specific language

Interactive Mode

DDGR provides an interactive mode that allows you to browse search results using arrow keys and select results by pressing Enter. This mode is automatically activated when you run DDGR commands.

Navigation controls in interactive mode

  • Arrow keys Navigate through search results

  • Enter Open selected result in default browser

  • q Quit the interactive mode

Conclusion

DDGR provides a convenient way to search DuckDuckGo directly from the Linux terminal, maintaining privacy while offering various search options including images, news, and Wikipedia. This tool is especially valuable for users who prefer command-line workflows and want to perform quick web searches without leaving the terminal environment.

Updated on: 2026-03-17T09:01:39+05:30

586 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements