links – excellent text and graphic web browser

links links-bookmarkslinks-graph

If you want make your web surfing quick or you are on slow connection, text web browser is best solution. There are a few of them out there, but one of the best is links. It can also be used as graphical web browser if you want (must be compiled with that option). What makes links browser my favorite choice? Ease of use, can run on almost all systems, all terminal emulators, easy to use with pull down menus, easy to configure, can display tables, frames in both graphics and text mode, numbered links for quick surfing, support for html 1.1 and 4.0 (but without css), background download and DNS lookup, possibility to hook up external programs for all MIME types, possibility to choose one of more programs at every opening, support for nested bookmarks, adjustable gammas, automatic aspect ratio, mouse support and, and, and…

Installation is easy, it can be found in official repositories, but if you want some special functions, you can compile and install links manually. There is a simple and good guide to do that at download site. Quickly said, just need to use:

$ ./configure --help
$ ./configure
$ make
$ make install    #with sudo if possible

There is very good online manual for help if needed here, or you can use the classic:

$ links --help
$ man links


Configuration is simply done with help of pull down menus, use or F9 for it and go to Settings menu for browser and View for html options.

Navigation is simple and fast with use of keyboard:

       ESC    menu/escape

       F9     menu

       F10    file menu

       TAB    next frame

       PGDN   page down

       Space  page down

       PGUP   page up

       b      page up

              next link/down

              prev link/up

       INS    scroll up

       ^P     scroll up

       DEL    scroll down

       ^N     scroll down

       [      scroll left

       ]      scroll right

       HOME   home

       END    end of page

              enter link/press button

       ENTER  enter link/press button

              go back

       d      download link

       /      search in the page

       ?      search back in the page

       n      find next match

       N      find next match backwards

       f      zoom actual frame

       ^R     reload page

       g      go to URL

       G      edit the current URL and goto the result

       ^G     edit the current link and goto the result

       s      bookmark manager

       q      quit, close window if more windows are open

       Q      quit without asking

       =      document information

             toggle HTML source/rendered view

…and editing keys:

              move right

              move left

       HOME   jump at the beginning

       ^A     jump at the beginning

       END    jump at the end

       ^E     jump at the end

       ^X     cut to clipboard

       ^B     copy to clipboard

       ^V     paste from clipboard

       ENTER  enter line

              delete back character

       ^H     delete back character

       DEL    delete character

       ^D     delete character

       ^U     delete from beginning of the line

       ^K     delete to the end of the line or delete line (in textarea)

       ^W     auto complete line

…and the two keys that I did not find described in manual:

        z     history back  (discribed in --help)

        x     history forward


Some tips:

Using ssh tunnel (useful for safe connection on public wifi):

First make ssh tunnel connection to your ssh server with:

$ ssh -v -TND (socks port) user@(ip-address) -p (ssh port if not default)

…or with use of mosh (mobile shell):

$ mosh -a -p (mosh port) user@(ip-address) --ssh="ssh -v -TND (socks port) -p (ssh port if not default)"

…and then start links with option:

$ links -socks-proxy user@localhost:(socks port) -only-proxies 1

Available are also http, https and ftp proxy connecting options.

Using magnet links for downloading torrents:

Option is available in Setup / Mail and telnet menu, and for usage with transmission-cli (console version of Transmission enter:

transmission-remote --add %

…and for rtorrent first make the following script:

cd $watch_folder
[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit;
echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"

…save it, for instance as .rtorrent-magnet, give it execution permission, and place it somewhere under your $PATH, and enter:

/path to file/.rtorrent-magnet %

Similar browsers:
lynx – a text browser for the World Wide Web,
elinks – an advanced and well-established feature-rich text mode web browser,
w3m – text web browser and also pager,
surfraw – Shell Users’ Revolutionary Front Rage Against the Web (a very minimalistic command line interface to a variety of popular WWW search engines),
…and (maybe):
Weboob – web outside of browsers (cli and gui).

Happy surfing.


Comments are closed.