elinks Command Examples in Linux

Text-mode web browsers provide a quick way to check that a web server is working or to get information from a web server when a usable GUI isn’t available. The once-popular lynx text-based browser was supplanted in most Linux systems by the links or elinks browsers. To use a command-line browser, you need to install one of these programs, with package names shown in parens: lynx (lynx-cur package), links (links package), and elinks (elinks package). In most cases, if you want a command-line web browser, install the elinks package.

Because elinks supports multiple colors, as long as the terminal you are using supports multiple colors, it’s easy to spot links and headings in the text. (Colors may not work within a screen session.) Here are some examples of elinks command lines:

$ elinks                             ### Prompts for file name or URL
$ elinks www.handsonhis1tory.com     ### Opens file name or URL you request

To display the elinks menu bar, press the Esc key. A bar appears across the top of the screen showing the words File, View, Link, Setup, Downloads, and Help. You can navigate the menu system using the keystrokes shown in table below:

Key Action
Esc Display (or hide, if pressed a second time) the elinks menu bar
Down arrow Move down through options in the selected menu
Up arrow Move up through options in the selected menu
Right arrow Open the menu to the right of the currently selected menu
Left arrow Open the menu to the left of the currently selected menu
Enter Select an item from the menu

elinks Command Examples

1. To run on anonymous account:

# elinks -anonymous
# elinks -anonymous 0
# elinks -anonymous 1

2. To automatically submit the first form in the given URL:

# elinks -auto-sbmit
# elinks -auto-sbmit 0
# elinks -auto-sbmit 1

3. To use internally when opening ELinks instances in new windows:

# elinks -base-session 2

4. To specify the config and runtime state files:

# elinks -config-dir /tmp/

5. To Print a configuration file with options:

# elinks -config-dump

6. To specify Name of the configuration file that all configuration options will be read from and written to:

# elinks -config-file /tmp/elinks.conf

7. To Print help for configuration options and exit:

# elinks -config-help

8. The default MIME type used for documents of unknown type:

# elinks -default-mime-type

9. To ignore all keybindings from configuration files:

# elinks -default-keys 0
# elinks -default-keys 1

10. To Print formatted plain-text versions of given URLs to stdout:

# elinks dump 0
# elinks dump 1

11. Codepage used when formatting dump output:

# elinks -dump-charset

12. Color mode used with -dump:

# elinks -dump-color-mode

13. Width of the dump output:

# elinks -dump-width

14. To specify configuration file directives on the command-line:

# elinks -eval `set protocol.file.allow_special_files = 1`

15. To make ELinks assume documents of unknown types are HTML:

# elinks -force-html /tmp/mydoc

16. To display the usage help:

# elinks -h
# elinks -?
# elinks -help

17. To Restricts ELinks to work offline and only connect to servers with local addresses:

# elinks -localhost 0
# elinks -localhost 1

18. To display the detailed help:

# elinks -long-help

19. To Look up specified host and print all DNS resolved IP addresses:

# elinks -lookup

20. To run ELinks as a separate instance instead of connecting to an existing instance:

# elinks -no-connect 0
# elinks -no-connect 1

21. To disable creation and use of files in the user specific home configuration directory:

# elinks -no-home 0
# elinks -no-home 1

22. To prevents printing of link number in dump output:

# elinks -no-numbering

23. To Prevents printing of references:

# elinks -no-references

24. To control a remote instance of elinks by passing command to it:

# elinks -remote ping 192.168.27.100
# elinks -remote openURL
# elinks -remote addBookmark
# elinks -remote infoBox
# elinks -remote xfeDoCommand

25. To Print given URLs in source form to stdout:

# elinks -source 0
# elinks -source 1

26. To write runtime stats to disk:

# elinks -touch-files 0
# elinks -touch-files 1

27. To set to verbose level:

# elinks -verbose 0
# elinks -verbose 1
# elinks -verbose 2

28. To get the version info:

# elinks -version
Related Post