lynx - Text browser for terminals

lynx [options] [path or URL]

cursor-addressable, character-cell display devices
Displays HTML documents containing links to files residing on the local system, as well as files residing on remote systems.

Access information on the Web or to build information systems intended primarily for local access.


load local file or remote URL specified at the command line.
underscores and dashes can be intermixed in option names
- arguments from stdin. allowing for very long command line that can be associated with the -get_data or -post_data.
Avoids having sensitive information in the command line (which would be visible to other processes on most systems), especially with -auth or -pauth .
-book use the bookmark page as the startfile.
The default or command line startfile is still set for the Main screen command, and will be used if the bookmark page is unavailable or blank.
-cache=N Default 10.
-case case-sensitive string searching.
-centerToggle center alignment in HTML TABLE.
-cfg=filename config
-child exit on left-arrow in startfile, and disable save to disk.
-cmd_log=file for keystroke commands and related information
-cmd_script=file read keystroke commands from the specified file.
Accepts output from -cmd_log . Ignores information which the command-logging may have written.

# begin comment lines.
key the character value, in printable form.
Cursor and other special keys are given as names, e.g., "Down Arrow".
Printable 7-bit ASCII codes are given as-is, and hexadecimal values represent other 8-bit codes.
set name=value override values set in cfg .

Color options
-color Also as COLORTERM environment variable.
Same as show_color=always in .lynxrc
Same as show_color=never in .lynxrc overridden by --color
-lss=file color-style information. default lynx.lss.
-nocolor force color mode off, overriding terminal capabilities and any -color flags, COLORTERM variable, and saved .lynxrc settings.
cookie options
-cookie_file=filename file to use to read cookies.
default ~/.lynx_cookies , ~/cookies for MS-DOS.
-cookies toggles handling of Set-Cookie headers.
-curses_pads toggles the use of curses "pad" feature which supports left/right scrolling of the display.
-debug_partial separate incremental display stages with MessageSecs delay
-core toggles forced core dumps on fatal errors. Turn this option off to ask lynx to force a core dump if a fatal error occurs.
-delay add DebugSecs delay after each progress-message
-display=D X-windows display variable
-trace_mask=value turn on optional traces. Logically OR the values to combine options:
 1 SGML character parsing states
 2 color-style
 4 TRST (table layout)
 8 config (lynx.cfg and .lynxrc contents)
16 binary string copy/append, used in form data construction.
-nested_tables toggles nested-tables logic
-exec enable local program execution (normally not configured).
-crawl with -traversal output each page to a file.
with -dump format output as with -traversal, but to stdout.
-link=n starting count for lnk#.dat files produced by -crawl.
-underscore toggles _underline_ format in dumps.
-nolist disable the link list feature in dumps.
-width=NUMBER number of columns for formatting of dumps, default is 80.
-with_backspaces emit backspaces in output if -dump'ing or -crawl'ing (like 'man' )
-dont_wrap_pre inhibit wrapping of text in <pre> with -dump and -crawl,
marks wrapped lines in interactive session.
-source as dump but outputs HTML source instead of formatted text.
-base request URL comment and BASE tag to text/html outputs for -source dumps.
-force_empty_hrefless_a force HREF-less <A elements to be closed as processed
-enable_scrollback toggles compatibility with communication programs' scrollback keys
-error_file=file HTTP access codes.
-fileversions include all versions of files in local directory listings.
-force_html forces the first document to be interpreted as HTML.
-force_secure toggles forcing of the secure flag for SSL cookies.
-forms_options toggles Options Menu : key-based | form-based.
-from toggles transmissions of From headers.
-mime_header ouptuts the MIME header along with its source.
-head send a HEAD request for the mime headers.
-get_data properly formatted data for a get form are read in from stdin and passed to the form.
Input is terminated by a line that starts with ---.
  1. merge bracketed numbers and are numbered together with other links in the sequence of their occurrence in the document.
  2. listonly only on L)ist screens and listings generated by -dump or from the P)rint menu, but appear separately at the end of those lists. .
  3. ignore
-historical toggles > or --> as a terminator for comments.
-image_links toggles inclusion of links for all images.
-homepage=URL set homepage separate from start page.
-index=URL set the default index file to the specified URL.
-ismap toggles inclusion of ISMAP links when client-side MAPs are present.
-justify do justification of text.
-localhost disable remote URLs
-locexec enable local program execution from local files only
-minimal toggles minimal versus valid comment parsing.
-buried_news toggles scanning of news articles for buried references, and converts them to news links. Not recommended because email addresses enclosed in angle brackets will be converted to false news links, and uuencoded messages can be trashed.
-newschunksize=NUMBER number of articles in chunked news listings.
-newsmaxchunk=NUMBER maximum news articles in listings before chunking.
-nocc disable Cc: prompts for self copies of mailings. Note that this does not disable any CCs which are incorporated within a mailto URL or form ACTION.
-noexec disable local program execution. (DEFAULT)
-ftp disable ftp access.
-nofilereferer disable transmissions of Referer headers for file URLs.
-nolog disable mailing of error messages to document owners.
-nonrestarting_sigwinch may cause more immediate ractaion to window changes within an xterm.
-number_fields number of links as well as form input fields
-number_links number links.
-partial toggles display partial pages while loading.
-partial_thres=lines to render before repainting display with partial-display logic
-pauth=ID:PASSWD set authorization ID and password for a protected proxy server at startup.
-popup toggles handling of single-choice SELECT options via popup windows or as lists of radio buttons.
-post_data properly formatted data for a post form are read in from stdin and passed to the form. Input is terminated by a line that starts with '---'.
-preparsed show HTML source preparsed and reformatted when used with -source or in source view.
-prettysrc show HTML source view with lexical elements and tags in color.
-print enable print functions. (default)
-pseudo_inlines toggles pseudo-ALTs for inlines with no ALT string.
-raw toggles default setting of 8-bit character translations or CJK mode for the startup character set.
-realm restricts access to URLs in the starting realm.
-reload flushes the cache on a proxy server (only the first document affected).
-anonymous apply restrictions for anonymous account, see also -restrictions.
Restriction operations:
-nopause disable forced pauses for statusline messages.
-noprint disable most print functions.
-noredir prevents automatic redirection and prints a message with a link to the new URL.
-noreferer disable transmissions of Referer headers.
-noreverse disable reverse video-attribute.
-nosocks disable SOCKS proxy usage by a SOCKSified Lynx.
-nostatus disable the retrieval status messages.
-nobrowse disable directory browsing.
-restrictions=[option]… dis-allows a list of services
all restricts all options listed below.
default same as command line option -anonymous.
Disables default services for anonymous users.
Set to all restricted, except for: inside_telnet, outside_telnet, inside_ftp, outside_ftp, inside_rlogin, outside_rlogin, inside_news, outside_news, telnet_port, jump, mail, print, exec, and goto.
The settings for these, as well as additional goto restrictions for specific URL schemes that are also applied, are derived from definitions within userdefs.h.
bookmark changing the location of the bookmark file.
bookmark_exec execution links via the bookmark file.
change_exec_perms changing the eXecute permission on files (but still allow it for directories) when local file management is enabled.
dired_support local file management.
disk_save saving to disk in the download and print menus.
dotfiles access to, or creation of, hidden (dot) files.
download some downloaders in the download menu (does not imply disk_save restriction).
editor external editing.
exec disable execution scripts.
exec_frozen the user from changing the local execution option.
externals some "EXTERNAL" configuration lines if support for passing URLs to external applications (with the EXTERN command) is compiled in.
file_url using G)oto, served links or bookmarks for file: URLs.
goto disable the 'g' (goto)
inside_ftp ftps for people coming from inside your domain U
inside_news USENET news posting for people coming from inside your domain U
inside_rlogin rlogins for people coming from inside your domainU
inside_telnet telnets for people coming from inside your domain U
jump disable the jump
multibook multiple bookmarks.
mail mail.
news_post USENET News posting.
options_save saving options in .lynxrc.
outside_ftp ftps for people coming from outside your domainU
outside_news USENET news reading and posting for people coming from outside your domain U
Applies to "news", "nntp", "newspost", and "newsreply" URLs, but not to "snews", "snewspost", or "snewsreply" in case they are supported.
outside_rlogin rlogins for people coming from outside your domain U
outside_telnet telnets for people coming from outside your domain U
print most print options.
shell shell escapes and lynxexec or lynxprog G)oto's.
suspend Unix Control-Z suspends with escape to shell.
telnet_port specifying a port in telnet G)oto's.
useragent modifications of the User-Agent header.
-resubmit_posts toggles forced resubmissions (no-cache) of forms with method POST when the documents they returned are sought with PREV_DOC or from the History List.
-rlogin disable recognition of rlogin commands.
-scrollbar toggles showing scrollbar.
-scrollbar_arrow toggles showing arrows at ends of the scrollbar.
-selective require .www_browsable files to browse directories.
-short_url show very long URLs in the status line with "..." to represent the portion which cannot be displayed. The beginning and end of the URL are displayed, rather than suppressing the end.
-show_cursor If enabled the cursor will not be hidden in the right hand corner but will instead be positioned at the start of the currently selected link. Show cursor is the default for systems without FANCY_CURSES capabilities. The default configuration can be changed in userdefs.h or lynx.cfg. The command line switch toggles the default.
-show_rate transfer rate is shown in bytes/second. Use lynx.cfg or the options menu to select KB/second and/or ETA.
-show-cfg on DaPie
### Lynx 2.8.8dev.12, at Tue Jul  9 19:22:07 2013  
EXTERNAL:ftp:w3m %s:TRUE
EXTERNAL:file:w3m %s:TRUE
EXTERNAL:http:w3m %s:TRUE
EXTERNAL:http:wget %s:TRUE
EXTERNAL:http:wget -r %s:TRUE
EXTERNAL:ftp:x-www-browser %s:TRUE
EXTERNAL:file:x-www-browser %s:TRUE
EXTERNAL:http:x-www-browser %s:TRUE

-soft_dquotes toggles emulation of the old Netscape and Mosaic bug which treated '> as a co-terminator for double-quotes and tags.
-stack_dump disable SIGINT cleanup handler
-startfile_ok allow non-http startfile and homepage with -validate.
-stdin read the startfile from standard input (UNIX only).
-syslog=text information for syslog call.
-tagsoup initialize parser, using Tag Soup DTD rather than SortaSGML.
-telnet disable recognition of telnet commands.
-term=TERM tell Lynx what terminal type to assume it is talking to. (may be useful for remote execution, Lynx connects to a remote TCP/IP port that starts a script that, in turn, starts another Lynx process.)
-timeout=N For win32, sets the network read-timeout, where N is given in seconds.
-tna turns on "Textfields Need Activation" mode.
-tlog toggles Trace Log vs stderr
-traversal traverse all http links derived from startfile.
With -crawl, each link that begins with the same string as startfile is output to a file, intended for indexing. See CRAWL.announce for more information.
-trim_input_fields trim input text/textarea fields in forms.
-blink forces high intensity background colors for color mode, if available and supported by the terminal. Applies to the slang library (for a few terminal emulators), or to OS/2 EMX with ncurses.
-nobold disable bold video-attribute.
-nounderline disable underline video-attribute.
-underline_links toggle
-use_mouse turn on mouse support, if available.
  • Clicking the left mouse button on a link traverses it. Clicking the right mouse button pops back.
  • Click on the top line to scroll up. Click on the bottom line to scroll down. The first few positions in the top and bottom line may invoke additional functions.
    Lynx must be compiled with ncurses or slang to support this feature.
     If ncurses is used, clicking the middle mouse button pops up a simple menu. Mouse clicks may only work reliably while Lynx is idle waiting for input.
-useragent=name set alternate Lynx User-Agent header.
-validate accept only http URLs (for validation). Complete security restrictions also are implemented.
-verbose toggle [LINK], [IMAGE] and [INLINE] comments with filenames of these images.
-version print version information.
Lynx Version 2.8.5rel.1 (04 Feb 2004)
libwww-FM 2.14, SSL-MM 1.4.1, OpenSSL 0.9.8e-fips-rhel5
Built on linux-gnu Oct 27 2008 15:58:42

Copyrights held by the University of Kansas, CERN, and other contributors.
Distributed under the GNU General Public License.
See and the online help for more information.

See for information about SSL for Lynx.
See for information about OpenSSL.
-wdebug enable Waterloo tcp/ip packet debug (print to watt debugfile).
Only DOS versions compiled with WATTCP or WATT-32.
-bibp=URL specify a local bibp server (default http://bibhost/).
-assume_charset=MIMEname Default charset
-connect_timeout=s in seconds.
-assume_unrec_charset=MIMEname for unrecognized charsets.



In addition to various "standard" environment variables such as HOME, PATH, USER, DISPLAY, TMPDIR

See also the sections on SIMULATED CGI SUPPORT and NATIVE LANGUAGE SUPPORT, below.

Not all environment variables apply to all types of platforms supported by Lynx, though most do.

COLORTERM color capability for the terminal is forced on at startup time. The actual value assigned to the variable is ignored. only meaningful if Lynx was built using the slang screen-handling library.
LYNX_CFG overrides the default location and name of the global configuration file (normally, lynx.cfg) that was defined by the LYNX_CFG_FILE constant in the userdefs.h file, during installation. See the userdefs.h file for more information.
LYNX_LOCALEDIR overrides the compiled-in location of the locale directory which contains native language (NLS) message text.
LYNX_LSS location of the default Lynx character style sheet file. [Currently only meaningful if Lynx was built using experimental color style support.]
LYNX_SAVE_SPACE overrides the default path prefix for files saved to disk that is defined in the lynx.cfg SAVE_SPACE: statement. See the lynx.cfg file for more information.
LYNX_TEMP_SPACE overrides default path prefix for temporary files that was defined during installation, as well as any value that may be assigned to the TMPDIR variable.
MAIL the default inbox Lynx will check for new mail, if such checking is enabled in the lynx.cfg file.
NEWS_ORGANIZATION if set, provides the string used in the Organization: header of USENET news postings. It will override the setting of the ORGANIZATION environment variable, if it is also set (and, on UNIX, the contents of an /etc/organization file, if present).
NNTPSERVER If set, this variable specifies the default NNTP server that will be used for USENET news reading and posting with Lynx, via news: URL's.
ORGANIZATION This variable, if set, provides the string used in the Organization: header of USENET news postings. On UNIX, it will override the contents of an /etc/organization file, if present.
PROTOCOL_proxy Lynx supports the use of proxy servers that can act as firewall gateways and caching servers. They are preferable to the older gateway servers (see WWW_access_GATEWAY, below). Each protocol used by Lynx, (http, ftp, gopher, etc), can be mapped separately by setting environment variables of the form PROTOCOL_proxy (literally: http_proxy, ftp_proxy, gopher_proxy, etc), to "http://some.server.dom:port/". See Lynx Users Guide for additional details and examples.
SSL_CERT_DIR Set to the directory containing trusted certificates.
SSL_CERT_FILE Set to the full path and filename for your file of trusted certificates.
WWW_access_GATEWAY Lynx still supports use of gateway servers, with the servers specified via "WWW_access_GATEWAY" variables (where "access" is lower case and can be "http", "ftp", "gopher" or "wais"), however most gateway servers have been discontinued. Note that you do not include a terminal '/' for gateways, but do for proxies specified by PROTOCOL_proxy environment variables. See Lynx Users Guide for details.
WWW_HOME This variable, if set, will override the default startup URL specified in any of the Lynx configuration files.
Environment Variables Set or Modified By Lynx:
LYNX_PRINT_DATE set by p(rint) , to the Date: string seen in the document's "Information about" page (= cmd), if any. It is created for use by an external program, as defined in a lynx.cfg PRINTER: definition statement. If the field does not exist for the document, the variable is set to a null string under UNIX, or "No Date" under VMS.
LYNX_PRINT_LASTMOD set by p(rint) , to the Last Mod: string seen in the document's "Information about" page (= cmd), if any. It is created for use by an external program, as defined in a lynx.cfg PRINTER: definition statement. If the field does not exist for the document, the variable is set to a null string under UNIX, or "No LastMod" under VMS.
LYNX_PRINT_TITLE set by p(rint), to the Linkname: string seen in the document's "Information about" page (= cmd), if any. It is created for use by an external program, as defined in a lynx.cfg PRINTER: definition statement. If the field does not exist for the document, the variable is set to a null string under UNIX, or "No Title" under VMS.
LYNX_PRINT_URL set by p(rint) , to the URL: string seen in the document's "Information about" page (= cmd), if any. It is created for use by an external program, as defined in a lynx.cfg PRINTER: definition statement. If the field does not exist for the document, the variable is set to a null string under UNIX, or "No URL" under VMS.
LYNX_TRACE write a trace file as if the -trace option were supplied.
LYNX_TRACE_FILE overrides the compiled-in name of the trace file, which is either Lynx.trace or LY-TRACE.LOG (the latter on the DOS platform). The trace file is in either case relative to the home directory.
LYNX_VERSION set by Lynx, and may be used by an external program to determine if it was invoked by Lynx. See also the comments in the distribution's sample mailcap file, for notes on usage in such a file.
TERM Normally, used by Lynx to determine the terminal type being used to invoke Lynx. If, however, it is unset at startup time (or has the value "unknown"), or if the -term command-line option is used (see OPTIONS section above), Lynx will set or modify its value to the user specified terminal type (for the Lynx execution environment). Note: If set/modified by Lynx, the values of the LINES and/or COLUMNS environment variables may also be changed.


If built with the cgi-links option enabled, Lynx allows access to a cgi script directly without the need for an http daemon.

When executing such "lynxcgi scripts" (if enabled), the following variables may be set for simulating a CGI environment:

       REMOTE_ADDR           REMOTE_HOST 
Other environment variables are not inherited by the script, unless they are provided via a LYNXCGI_ENVIRONMENT statement in the configuration file. See the lynx.cfg file, and the (draft) CGI 1.1 Specification for the definition and usage of these variables.

The CGI Specification, and other associated documentation, should be consulted for general information on CGI script programming.


If configured and installed with Native Language Support, Lynx will display status and other messages in your local language. See the file ABOUT_NLS in the source distribution, or at your local GNU site, for more information about internationalization.

The following environment variables may be used to alter default settings:

LANG override the default message language. It is an ISO 639 two-letter code identifying the language. Language codes are NOT the same as the country codes given in ISO 3166.
LANGUAGE override the default message language. This is a GNU extension that has higher priority for setting the message catalog than LANG or LC_ALL.
LC_ALL and
LC_MESSAGES specify the notion of native language formatting style. They are POSIXly correct.
LINGUAS if set prior to configuration, limits the installed languages to specific values. It is a space- separated list of two-letter codes. Currently, it is hard-coded to a wish list.
NLSPATH used as the path prefix for message catalogs.


             Options Menu (Lynx Version 2.8.5rel.1)        Options Menu (p1 of 2)
          Accept Changes - Reset Changes - Left Arrow cancels changes - HELP!  
               Save options to disk: [ ]
    (options marked with (!) will not be saved)

  General Preferences
  User mode                        : [Novice______]
  Editor                           : ________________________________________
  Type of Search                   : [Case insensitive]

  Security and Privacy
  Cookies (!)                      : [ask user__]
  Invalid-Cookie Prompting (!)     : [prompt normally___]
  SSL Prompting (!)                : [prompt normally___]

  Keyboard Input
  Keypad mode                      : [Numbers act as arrows_____________]
  Emacs keys                       : [OFF]
  VI keys                          : [OFF]
  Line edit style                  : [Default Binding___]
  Keyboard layout                  : [ROT13'd keyboard layout____________]

  Display and Character Set
  Use locale-based character set(!): [ON_]
  Display character set            : [UNICODE (UTF-8)________________]
  Assumed document character set(!): [iso-8859-1______]
  Raw 8-bit (!)                    : [OFF]
  X Display (!)                    : _______________________________________

  Document Appearance
  Show color                       : [ON____]
  Show cursor                      : [OFF]
  Underline links (!)              : [OFF]

page 2
  Show scrollbar (!)               : [OFF]
  Popups for select fields         : [ON_]
  HTML error recovery (!)          : [strict (SortaSGML mode)]
  Show images (!)                  : [as labels]
  Verbose images                   : [show filename]

  Headers Transferred to Remote Servers
  Personal mail address            : _____________
  Preferred document character set : ____________
  Preferred document language      : en_________
  User-Agent header (!)            : Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.8e-fips-rhel5____

  Listing and Accessing Files
  FTP sort criteria                : [By Name]
  Local directory sort criteria    : [Mixed style______]
  Local directory sort order       : [By Name_]
  Show transfer rate (!)           : [Do not show rate___]

  Special Files and Screens
  Multi-bookmarks                  : [OFF_____]
  Bookmarks file                   : lynx_bookmarks.html_____
  Visited Pages                    : [By Last Visit Reversed_]

  View the file lynx.cfg.

      Accept Changes - Reset Changes - Left Arrow cancels changes 
This is the Lynx v2.8.4 Release

to contribute to the further development of Lynx, subscribe to our mailing list. Send email to with "subscribe lynx-dev" as the only line in the body of your message. Bug reports, comments, suggestions to

See Also

catgets(3), curses(3), environ(7), execve(2), ftp(1), gettext(GNU), localeconv(3), ncurses(3), setlocale(3), slang(?), termcap(5), terminfo(5), wget(GNU)