If you want to search from the command line and jump to a user-definable browser for results, another solution is use surfraw.
Surfraw provides a fast unix command line interface to a variety of
popular WWW search engines and other artifacts of power. It reclaims
google, altavista, dejanews, freshmeat, research index, slashdot and
many others from the false‐prophet, pox‐infested heathen lands of
html‐forms, placing these wonders where they belong, deep in unix
heartland, as god loving extensions to the shell.
It's available pre-packaged in some Linux distributions (Debian, Ubuntu, unknown others), from source at debian.org, and the latest development code and releases are available from the official git repository (now living on GitLab).
Installation instructions from tarball or deb file are found on the Wiki.
Trivia note : Surfraw was originally written by Julian Assange. (Acronym/backronym for 'SURFRAW' is Shell Users' Revolutionary Front Rage Against the World Wide Web.)
To do a Google search from the command line:
sr google archibald tuttle
In addition to plain old Google, there are a lot of other built in search types.
To search for an RFC dealing with S/MIME:
sr rfc s/mime
Translate a word:
sr translate logiciel
Find torrents:
sr piratebay free music
(These keyword search types continue to be updated.)
More advanced usage :
$ surfraw google -results=100 RMS, GNU, which is sinner, which is sin?
$ sr wikipedia surfraw
$ sr austlii -method=phrase dog like
$ /usr/lib/surfraw/rhyme -method=perfect Julian
Surfraw is configurable. You can set it up with some defaults, either per-user in $HOME/.surfraw.conf
or system-wide in /etc/surfraw.conf
:
SURFRAW_graphical_browser="/usr/bin/links2 -g"
SURFRAW_text_browser="/usr/bin/elinks"
SURFRAW_graphical=yes
Here I've set it to use links2 and elinks, but you can use Firefox, Chrome, or any others you prefer.
(Nb. links2 -g
is a strange terminal-embedded graphical-mode browser. It's fast but hates modernity.)
1Closed as off-topic? Can it not just be migrated? – neverMind9 – 2018-10-21T20:52:42.170
3
The website emulating a console - are you talking of goosh? http://goosh.org/
– None – 2009-09-26T14:36:15.8833you will end up open the browser anyway, whats the point? – akira – 2009-09-26T15:53:11.893
6the point is to issue google searches from the terminal where we spend most of our time and are most comfortable. it might also be neat to have your recent google searches all visible in a command line history. – Landon Kuhn – 2012-11-05T06:37:19.203