← 返回命令列表

Linux command

ddgr 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Search DuckDuckGo

ddgr [search terms]

Open the first result

ddgr -j [search terms]

Search a specific website

ddgr -w [amazon.com] [digital camera]

Limit search to recent results

ddgr -t [w] [search terms]

Set number of results

ddgr -n [25] [search terms]

Use a DuckDuckGo bang

ddgr ![w] [wikipedia search]

Output results as JSON

ddgr --json [search terms]

Search through a proxy

ddgr --proxy [localhost:8118] [search terms]

说明

ddgr is a command-line tool for searching DuckDuckGo from the terminal. It displays search results with title, URL, and text context. Results are paginated and indexed, allowing quick navigation and opening in a browser by number. The tool supports DuckDuckGo bangs (shortcuts like !w for Wikipedia, !yt for YouTube) and keywords like filetype: and site:. Results can be limited by time period or region. DuckDuckGo's privacy-focused approach means no tracking, and ddgr works over the Tor network.

参数

-n, --num=_N_
Show N results per page (0-25, default: 10).
-r, --reg=_REG_
Region-specific search (e.g., us-en, uk-en, in-en).
-j, --ducky
Open first result in browser; implies --noprompt.
-t, --time=_SPAN_
Limit search by time: d (day), w (week), m (month), y (year).
-w, --site=_SITE_
Search a specific website.
-x, --expand
Show complete URLs instead of just domains.
-p, --proxy=_URI_
Route traffic through HTTP proxy.
--unsafe
Disable safe search.
--json
Output results as JSON; implies --noprompt.
--np, --noprompt
Search and exit without interactive prompt.
--colors=_COLORS_
Set custom output color scheme.
-C, --nocolor
Disable colored output.
-h, --help
Display help and exit.

FAQ

What is the ddgr command used for?

ddgr is a command-line tool for searching DuckDuckGo from the terminal. It displays search results with title, URL, and text context. Results are paginated and indexed, allowing quick navigation and opening in a browser by number. The tool supports DuckDuckGo bangs (shortcuts like !w for Wikipedia, !yt for YouTube) and keywords like filetype: and site:. Results can be limited by time period or region. DuckDuckGo's privacy-focused approach means no tracking, and ddgr works over the Tor network.

How do I run a basic ddgr example?

Run `ddgr [search terms]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n, --num=_N_ do in ddgr?

Show N results per page (0-25, default: 10).