surfraw - a fast unix command line interface to WWW services


   surfraw elviname [options] search words ...
   sr elviname [options] search words ...
   sr -elvi
   sr [options] bookmark [search words]


   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.

   Surfraw consists of a collection of elvi, each of which  knows  how  to
   search a specific web site.  To see the list of elvi type:

    surfraw -elvi

   Note that sr is an alias for surfraw, so that could equally be

    sr -elvi

   To search using an elvis use:

    sr elviname [options] search terms..

   For  example,  to  search google for information on Debian ports, using
   the "I'm feeling lucky" option:

    sr google -l debian ports

   Adding the elvi to your path
   If you are a regular user of surfraw, you will  probably  get  sick  of
   typing  sr  or  surfraw  each time. You can regain the old behaviour of
   running  the  elvi  directly  by   adding   the   elvi   directory   (‐
   /usr/lib/surfraw)    to   your   path,   either   manually   or   using

   Surfraw  supports  bookmarks.  To   add   a   bookmark,   add   it   to
   /etc/xdg/surfraw/bookmarks or $HOME/.config/surfraw/bookmarks

   The  format  of  the  bookmarks  file  is simple, each bookmark is on a
   separate line, with the bookmark and URL separated by whitespace, eg:


   If the url contains the string %s, you can specify an optional argument
   to the bookmark. Without an argument, only the domain will be returned.
   With arguments, %s will be replaced by the arguments. This obviates the
   need to create elvi for sites with very simple search options.

   To  invoke  a bookmark, use "surfraw bookmark" or "sr bookmark", and if
   an elvis of that name doesn't exist, it searches for a bookmark of that
   name instead.

   There are some example bookmarks in /etc/xdg/surfraw/bookmarks


   Use  sr elviname -local-help for elvi‐specific options.

   The following options work with all elvi.

   -help  Show summary of options (including elvi‐specific options).

          Show elvi‐specific options.

          Show version of program.

          Set browser (default: sensible-browser).

   -elvi  Display a list of other Surfraw mechanisms for conquering evil.

          Apply url escaping to arguments (default: yes)

          Bracket  all  arguments  with  " characters (default: no).  Note
          that putting quotes round arguments works now, so  you  can  do,
          for example:

           sr google foo "bar baz" bam

          and the quoting is passed on to the search engine


    $ sr ask why is jeeves gay?
    $ surfraw google -results=100 RMS, GNU, which is sinner, which is sin?
    $ sr austlii -method=phrase dog like
    $ /usr/lib/surfraw/rhyme -method=perfect Julian


   Surfraw         uses         the         XDG        basedir        spec
   to  locate config files. The default locations are shown below, but can
   be modified by setting the environment variables  $XDG_CONFIG_HOME  and
   $XDG_CONFIG_DIRS.  See the spec for more details.

   Surfraw gets its configuration from three sources, in order:

   1.  Environment variables

   2.  /etc/xdg/surfraw/conf

   3.  $HOME/.config/surfraw/conf

   /etc/xdg/surfraw.conf and $HOME/.config/surfraw/conf are both fragments
   of bourne‐shell style shell script.

   /etc/xdg/surfraw.conf should use def and  defyn  to  define  variables.
   These  functions  set  variables  unless  they  are  already set by the
   environment.  defyn is used for boolean  configuration  variables,  def
   for all others. For instance:

    def     SURFRAW_text_browser /usr/bin/lynx
    defyn   SURFRAW_graphical         no

   $HOME/.config/surfraw/conf should use sh‐style entries, eg:


   This  is  because  you  want  them  to  override  environment variables


          Location of global configuration file.


           def SURFRAW_global_conf /etc/xdg/surfraw/conf

          Location of per‐user configuration file.


           def SURFRAW_conf $HOME/.config/surfraw/conf

          Whether to use a graphical browser.


          defyn SURFRAW_graphical no

          Name/path of text browser executable.  e.g. links, lynx, w3m


          def SURFRAW_text_browser sensible-browser

          Name/path  of  graphical  browser  executable.    e.g   mozilla,
          netscape etc.


           def SURFRAW_graphical_browser sensible-browser

          Text browser arguments, or "none".


           def SURFRAW_text_browser_args none

          Graphical browser arguments, or "none".


           def SURFRAW_graphical_browser_args none

          Whether to use "-remote openURL" for graphical browser.


           defyn SURFRAW_graphical_remote yes

          When using SURFRAW_graphical_remote, open a new window?


           defyn SURFRAW_new_window no


          Name of screen command to run.


           def SURFRAW_screen screen

          If  surfraw  is  running under screen(1), start a new screen for
          each text browser invocation?


           defyn SURFRAW_new_screen no

          Arguments to pass to the SURFRAW_screen command


           def SURFRAW_screen_args ""

          Whether to "quote" all the arguments.


           defyn SURFRAW_quote_args no

          Whether to re‐quote arguments if they have spaces in, ie so:
           sr google foo "bar baz" bam
          works as expected.


          defyn SURFRAW_quote_ifs    yes

          Default number of results to return (not supported by all elvi).


           def SURFRAW_results 30

          Whether to escape [% "$%&+,/:;<=>?@[{|}~'] characters in command
          line arguments subsequently used to construct a url.


           defyn SURFRAW_escape_url_args yes


          Location of the elvi.

          Per‐user elvi.

          Default system wide configuration file.

          Default per‐user config file

          System wide bookmarks file.

          Per‐user bookmarks file.


   Please report any bugs found (or any web sites in need of surfrawizing)
   either via the debian bug tracking system (  or
   to the surfraw-devel list (



                                  Oh Baybe
                                 I need some
                                Deep Linking
                                  Let us go
                             Surfin' in the raw!

   Read  HACKING.  Surfrawize  the soul of your favourite internet wonder.
   Join the Shell Users' Revolutionary Front Against the WWW by submitting
   code.   Reclaim  heathen  lands.   Bear witness to the truth.  Its love
   will set you free.

   Join us on


   Originally written by Julian Assange.

   Now     maintained     by      the      surfraw-devel      team      <‐>.

   See the file AUTHORS for the full list of contributors.

   Man  page  by Ian Beckwith, based on the original README and an earlier
   man page by Christian Surchi.


     Copyright (c) 2003-2013 The Surfraw-Devel Team
     Copyright (c) 2000-2001 Julian Assange <>
     Copyright (c) 2001 Australian Institute for Collaborative Research
     Copyright (c) 2000 Melbourne Institute for Advanced Study

   The copyright holders listed above assert no rights on this release  of
   the  software ``surfraw'' and thereby explicity place this release into
   the into the public domain. Do what you will.

                             Feb 03, 2004                       SURFRAW(1)


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.

Free Software

Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.

Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.

Free Books

The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.

Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.

Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.