Surfing the Web with lynx

Surfing the Web with lynx

You can also surf the Web using lynx, a text-based Web browser. It's not as spiffy as links and doesn't handle many Web pages as gracefully, but it has its place in your toolbox, too. Generally, you can access the wealth of information available on the Web (Figure 12.7), and you can use lynx to easily download and reformat pages.

Figure 12.7. You can use lynx to navigate to any site on the Web.

To Surf the Web with lynx:



At the shell prompt, type lynx followed by the name of an .html file or a Web site address. Here, we're accessing the Yahoo Web site (Figure 12.7).

If you only type in lynx, you'll get the default page for your system, which is likely the lynx home page or the main page for your ISP.


Surf, surf, surf!

See the sidebars Navigating with lynx and Useful lynx Keystrokes in this section for details.


Press to quit and return to the shell prompt. That's it!

Navigating with lynx

  • (or ) follows the currently highlighted link to a new page.

  • returns to the previous page.

  • moves the highlight down to the next link in the document.

  • moves the highlight up to the previous link in the document.

  • returns you to the first screen you accessed in the sessionthe one you saw in step 1.

  • scrolls down to the next page.

  • scrolls up to the previous page.


  • If you access a lynx-unfriendly page, like the one shown in Figure 12.8, press the to scroll down a few times. Usually you'll be able to find the content.

    Figure 12.8. Some sites are considerably less friendly than others if you're not using graphics.

  • lynx is a great way to get a spiffy plain text file out of an .html document. Try lynx -dump goodpage.html > newname.txt to start lynx and direct it to send the display to standard output, and then redirect the output to the file called newname.txt. This will give you the text from the page, without HTML code, in a file in your Unix account.

  • lynx makes it really easy to get a quick view of a local .html document, but it isn't as flexible as links for Web browsing in general.

Useful lynx Keystrokes

  • /findme finds text within the file. (Replace findme with the text you're looking for.)

  • lets you access help.

  • downloads the current link.

  • goes to an address or file. You enter the address at the prompt.

  • lets you edit the current address.

  • adds the current link to your bookmark list.

  • lets you view the bookmark list.

  • lets you see a list of pages you've visited (your history).

  • \ lets you toggle back and forth between viewing the formatted page and viewing the HTML source.

  • reloads the current page and refreshes the screen.

Unix(c) Visual Quickstart Guide
UNIX, Third Edition
ISBN: 0321442458
EAN: 2147483647
Year: 2006
Pages: 251

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: