13.8 Browsers

The first thing that people think about when they hear the word Internet is “surfing the net”. Or looking at websites using a web browser. This is probably by far the most popular use of the Internet for the average user.

Slackware provides popular graphical web browsers in the “XAP” series, as well as text mode browsers in the “N” series. We'll take a quick look at some of the most common options below.

13.8.1 lynx

lynx(1) is a text-based web browser. It is a very quick way of looking up something on the Internet. Sometimes graphics just get in the way if you know exactly what you're after.

To start lynx, just type lynx at the prompt:

% lynx

Figure 13-5. Lynx default start page

You may want to specify a site for lynx to open to:

% lynx http://www.slackware.com

lynx prints the command keys and what they do at the bottom of the screen. The up and down arrow keys move around the document, Enter selects the highlighted link, and the left arrow goes back to the previous page. Typing d will download the currently selected file. The g command brings up the Go prompt, where you can give lynx a URL to open.

There are many other commands in lynx. You can either consult the man page, or type h to get the help screen for more information.

13.8.2 links

Just like lynx, links is a textmode web browser, where you do all the navigation using the keyboard. However, when you press the Esc key, it will activate a very convenient pulldown menu on the top of the screen. This makes it very easy to use, without having to learn all the keyboard shortcuts. People who do not use a text browser every day will appreciate this feature.

links seems to have better support for both frames and tables, when compared to lynx.

Figure 13-6. Links, with the file menu open

13.8.3 wget

wget(1) is a command line utility that will download files from a specified URL. While not an actual web-browser, wget is used primarily to grab whole or partial web sites for offline viewing, or for fast download of single files from HTTP or FTP servers instead. The basic syntax is:

% wget <url>

You can also pass options. For example, this will download the Slackware web site:

% wget --recursive http://www.slackware.com

wget will create a www.slackware.com directory and store the files in there, just as the site does.

wget can also download files from FTP sites; just specify an FTP URL instead of an HTTP one.

% wget ftp://ftp.gnu.org/gnu/wget/wget-1.8.2.tar.gz
--12:18:16--  ftp://ftp.gnu.org/gnu/wget/wget-1.8.2.tar.gz
           => `wget-1.8.2.tar.gz'
Resolving ftp.gnu.org... done.
Connecting to ftp.gnu.org[]:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.   ==> PWD ... done.
==> TYPE I ... done. ==> CWD /gnu/wget ... done.
==> PORT ... done.   ==> RETR wget-1.8.2.tar.gz ... done.
Length: 1,154,648 (unauthoritative)

100%[==================================>] 1,154,648     209.55K/s    ETA 00:00

12:18:23 (209.55KB/s) - `wget-1.8.2.tar.gz' saved [1154648]

wget has many more options, which make it nice for site specific scripts (web site mirroring and so forth). The man page should be consulted for more information.