Skip to content
Blog Search Google.com from the Linux command line

Search Google.com from the Linux command line

You can search Google.com from the Linux command line without using a command line web browser like lynx or Elinks.

All u need is the curl and html2text packages installed. Then issue the following command:


curl -A Mozilla http://www.google.com/search?q=Dipin+Krishna |html2text -width 60

where you can replace Dipin Krishna with another keyword of your choice. The results will be displayed in your console application with a width of 60.

Few other examples:

curl -A Mozilla http://www.google.com/search?q=how+to+install+ubuntu  |html2text -width 80
curl -A Mozilla http://www.google.com/search?q=install+gtalk+in+ubuntu |html2text -width 100

Leave a Reply

Your email address will not be published. Required fields are marked *

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