Googler is the command line search tools. You can search web, news, google sites search etc just typing command in Linux. Every Linux users need to google from web browser interface but most of the time Linux users work on terminal for day to day activity. They face difficulties to switch every-time from graphical interface to Linux terminal. That’s why Googler came in focus. Googler is the Python-based command line tool. It is also powerful tool.
TOP 10 GOOGLER FEATURES
1. Provide Google Search, Google News and Google site search.
2. Clean and fast with custom colours and no any ads.
3. Also provide navigate search result from omniprompt.
4. It fetching of number of results in a go and user can start at the nth result.
5. If user don’t want to spell check he can disable automatic spelling correction and can search exact keyword.
6. Support limit search by duration, language preference and country/domain specifc search.
7. Provide Google search keyword like filetype:mime, site:somesite.com and many more.
8. Also support HTTPS proxy support.
9. Searching Non-Stop : Begin new search at omnipromt without exiting.
10.Provide man page with example, zsh, fish and shell completion scripts for bash.
Note : To use Googler you will need to install Python 3.3 or later version. Make sure Python 3.3 or later version should be installed on your system.
Follow my previous post to install python3 ” Easy Steps To Install Python3 On CentOS ” on system.
INSTALLING GOOGLER IN LINUX SYSTEM
You can install Googler easily on Linux system using below command with github master branch and upgrade Googler for latest stable version.
# curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jarun/googler/master/googler && chmod +x /usr/local/bin/googler % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 81989 100 81989 0 0 41723 0 0:00:01 0:00:01 --:--:-- 92958 #googler -U --include-git
INSTALLING GOOGLER IN UBUNTU AND DEBIAN SYSTEM
You will need to use PPA repository to install Googler on Ubuntu or Debian system using below command to install it.
# sudo add-apt-repository ppa:twodopeshaggy/jarun # sudo apt-get update # sudo apt-get install googler
If you get any error during installation you can directly download and install from source. Follow below steps to install.
# cd /tmp/ # wget -c https://github.com/jarun/googler/archive/v2.9.tar.gz # tar -xvf v2.9.tar.gz # cd googler-2.9 # sudo make install # cd auto-completion/bash/ # sudo cp googler-completion.bash /etc/bash_completion.d/
COMMAND LINE GOOGLER USAGE
I am going to explain how we can use Googler using command line with some screenshot. If you want to know more about Googler use its man page
To show information about www.looklinux.com type below command. You can see default 10 result about www.looklinux.com in terminal.
# googler www.looklinux.com stdout encoding 'ascii' detected. googler requires utf-8 to work properly. The wrong encoding may be due to a non-UTF-8 locale or an improper PYTHONIOENCODING. (For the record, your locale language is <unknown> and locale encoding is <unknown>; your PYTHONIOENCODING is not set.)
Above you can see stdout encoding ‘ascii’ detected. It is default encoding set on your system. You will need to change it to “utf 8”.
Follow the below command to change from “ascii” to “utf 8” encoding on system temporarily.
You can change locale permanently putting the following line to bash profile “~./bashrc or ~/.profile“.
#vim ~/.bashrc OR #vim ~/.profile export LANG=en_US.utf8
Save and exit.
Now again run below command.
# googler www.looklinux.com
You can see omnipromt help at the end of the search page by entering the “?”. Press “Enter” you can see detailed of each key functionality.
In below example, I am going to search for the quoted words like “mysql database” on www.looklinux.com.
# googler -n 4 -w www.looklinux.com \"mysql database\"
-n :- To display at most 4 googler result per a page default is 10.
-w :- Google site ” www.looklinux.com” serarch enable.
You can also see latest news related to CentOS from the Google search news using -N option.
# googler -N CentOS
I hope this article will be helpful to understand how we can install and use Googler command line search on Linux. If you have any queries and problem please comment in comment section or you can also ask your question.