Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I browse the Internet from the command line in Ubuntu?

share|improve this question
up vote 80 down vote accepted

There are actually a bunch of text-mode web-browsers, these are my top three :)

  • ELinks (install):

    elinks screenshot

    • Keyboard Shortcuts

      • Open new tab - t
      • Goto URL - g
      • Go back - Left
      • Go forward - u
      • Exit - q
      • Toggle images - *
      • Toggle link numbering - .
      • Toggle document colours - %
      • Next tab - >
      • Previous tab - <
      • Close tab - c
      • Open in new tab in background - T
    • Automatic URL rewrites

      • d - dictionary search
      • dmoz - dmoz search
      • g - google search
      • wiki - wikipedia search


Wikipedia has a List of more text-based web-browsers, not all of which are available in Ubuntu.

share|improve this answer
Its a very old post and my question is also odd but can you tell while browsing internet using w3m how to open a "linked" new tab website.. Just like Open link in new tab feature available in chrome. If this cant be done in w3m can you suggest any other text-mode web-browsers – Eka Apr 10 '15 at 20:25
Wow, thanx for mentioning elinks' inbuilt search rewrites ("smart prefixes").. somehow missed them although I've been using elinks (with joy!) for years! here's a conf line to invoke it nicely from inside tmux, the 21st century terminal multiplexer: bind-key g command-prompt -p "google:" "split-window -c '#{pane_current_path}' -p 90 'elinks -no-home -no-connect \"g %%\"'" – eMPee584 Jul 15 '15 at 11:22

links2 -g is a strange terminal-embedded graphical-mode browser. It's fast but hates modernity.

If you like to search from the command line, try 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.

Trivia note : Surfraw was originally written by Julian Assange. (Acronym/backronym for 'SURFRAW' is Shell Users' Revolutionary Front Rage Against the World Wide Web.)

Here's some example usage. To search Google for "nm-applet memory leak" :
sr google nm-applet memory leak

To search for an RFC dealing with S/MIME:
sr rfc s/mime

Translate a word:
sr translate logiciel

Find torrents:
sr piratebay natty narwhal

More advanced, from :

     $ 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

You can set it up with some defaults in .config/surfraw/conf :

SURFRAW_graphical_browser="/usr/bin/links2 -g"
share|improve this answer
+1 for links2 :) – Rafał Cieślak Mar 8 '11 at 20:05

If you meant a CLI based Internet browser, use w3m:

w3m ''
share|improve this answer
This is awesome! I didn't know it existed. – Ashfame Mar 8 '11 at 17:12
There's also links, which I personally like better than w3m. – Cedric Mar 8 '11 at 17:13
links or lynx? I prefer curl -vvv 2>&1 | less, but that is not really a browser. – Lekensteyn Mar 8 '11 at 17:24
Thanks I was looking for the www command line browser. Looks like w3m is it, or something very close! – jerome Jan 6 '13 at 3:09
@Lekensteyn Is there a way to make less skip all the HTML tags? A lot of websites today have things like ad banners and tags that link to Google Analytics or something and it makes it really hard to read the content. – Arc676 Jul 31 '15 at 16:53

Another very good command line browser is lynx.

The most basic usage would be:


It will most likely ask if you want to allow cookies.

To navigate the page use the arrow keys. Here is a short description of the most important ones.

  • Left - move back in history
  • Right - follow a link
  • Up - move to previous focusable item
  • Down - move to next focusable item
  • Enter - enter link / trigger action
  • Backspace - history page
  • Space - move page down by a page
  • b - move page up by a page
  • Shift + q - Quit

That is the most basic key navigation commands.

share|improve this answer

You want a text browser or a command line method? This is command line, using telnet e.g.

telnet 80


It doesn't support SSL, graphics, HTML5 etc and you might have to guess the index page if the server doesn't have a default file. But it is better than nothing and a very quick testing tool.

share|improve this answer
This is the worst web browser ever :D – Danyal Aytekin Feb 27 '14 at 17:29

Another program that might work for you is lynx. It is a terminal based web browser.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.