Saner Web Searches in the Terminal

If you’re of the geeky persuasion (you’re reading this site, so the odds are pretty good that you are!) and you want a minimalist way to search the web from the comfort of the command line, you’ll want to check out the terminal tool ddgr.

This powerful program uses the DuckDuckGo search engine and presents 10 top search results directly within the Terminal. Because it’s serving text, your search results are presented instantaneously, without any sponsored ads to weed through.

In my usage, DuckDuckGo has been pretty solid as a search engine, delivering results that are relevant to what I’m searching for. (The same can’t be said for Google searches.)

Type in your search query like so…

 

…and you’ll get your results. Type in the number of the result you want to visit, and it will open up in your web browser.

I’ve installed ddgr on both popOS and macOS and it works like a charm. To use ddgr after installing it, open the Terminal and type ddgr followed by your search prompt, then hit “Enter”. (You’ll want to leave off any punctuation like question marks or exclamation points, as ddgr will complain if you do.)

ddgr will fetch 10 results. To view the link to your corresponding selection, simply type the number associated with the corresponding search result, and it will display within your web browser. You can also optionally copy the link to your computer’s clipboard, if you choose.

To exit ddgr, just hit ‘enter’ twice and you’ll be back at your terminal command prompt.

Because I’m lazy when it comes to typing, I have aliased ‘gg’ to ‘ddgr’ in all of my shells.

 

-Krishna

No comments yet. Be the first!

Tell me what you think!

  • This site uses Akismet to reduce spam. Learn how your comment data is processed.