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.
sudo add-apt-repository ppa:twodopeshaggy/jarun
sudo apt-get update
sudo apt-get install ddgr
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 fossbytes are listed:
In case you wish to open the first result in browser, follow this pattern;
ddgr -j searchterm
To search the contents of a site, follow this pattern and enter search query when prompted:
ddgr -w website.com
ddgr -x searchterm
To exit ddgr, hit double Enter or use q key. For help and complete list of supported cmdline options, use help command:
You 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:
- Watch Star Wars in terminal
- Use StackOverflow in terminal
- Get Weather report in terminal
- Access Google through terminal
- Use Wikipedia from command line
- Check Cryptocurrency Prices From Terminal
- Search and download torrent in terminal
- TLDR pages: Simplified Linux Man Pages