ELinks
ELinks is a free and open-source text-based web browser designed for command-line environments, supporting protocols such as HTTP and FTP while rendering frames and tables in a lightweight, customizable interface.[1]Originating as a fork of the Links browser in the early 2000s, ELinks was initiated by developer Petr Baudis to incorporate extensive patches and enhancements that had stalled in the original project, aiming to create the most advanced text-mode browser available.[2] It evolved from Links version 0.96, integrating features like Lua scripting from the Links-Lua fork and emphasizing modular design for portability across platforms including Unix-like systems, Windows, and DOS.[2] Licensed under the GNU General Public License, ELinks prioritizes speed, clean rendering, and extensibility without unnecessary bloat, supporting additional functionalities such as cookies, bookmarks, SSL encryption, and background downloads.[3]
The project remains actively maintained through a community-driven fork on GitHub, with the latest stable release, version 0.18.0, issued in December 2024, featuring fixes for 32-bit systems, Windows builds, and compatibility improvements.[4] This ongoing development ensures ELinks' relevance for users in resource-constrained environments, such as servers or embedded systems, where graphical browsers are impractical.[3]
History and Development
Origins and Fork from Links
The original Links browser was developed by Mikuláš Patočka starting in 1999 as a text-mode World Wide Web browser designed to provide efficient navigation in terminal environments.[5] It quickly gained popularity among users of Unix-like systems for its lightweight design and support for basic HTML rendering without graphical dependencies. Patočka maintained the project as open-source software under the GPL, focusing on stability and compatibility across various platforms. By 2001, development of Links had stagnated at version 0.96, with subsequent releases limited to bug fixes and no acceptance of new features, prompting contributors to seek alternatives for innovation.[2] This led to the creation of ELinks as a fork initiated by Petr Baudiš, known online as "pasky," who aimed to enable more liberal enhancements, faster development cycles, and community-driven improvements while building directly on the solid foundation of Links 0.96.[2] The initial goals of ELinks emphasized developing the premier text-mode browser with a high-performance rendering engine optimized for speed and cleanliness, alongside exploratory support for minimal graphical modes—though text-based operation remained the core priority to preserve accessibility in resource-constrained settings.[2] Baudiš began by applying the first experimental patches, known as the "-pb patches," to Links 0.96 in late 2001, establishing the branching point that separated ELinks from its parent project.[2] These efforts culminated in the release of the first official ELinks version 0.1.0 on March 2, 2002, marking the formal launch of the project as an independent entity.Key Milestones and Maintainers
A significant leadership transition occurred on September 1, 2004, when original developer Petr Baudiš handed over maintainership of ELinks to Jonas Fonseca, as Fonseca is documented as the project's maintainer in official author listings following this period.[6] This change allowed Baudiš to concentrate on other initiatives, while Fonseca oversaw subsequent development efforts.[7] Around 2004–2005, ELinks incorporated Lua scripting capabilities derived from the Links-Lua fork, substantially improving the browser's extensibility for user customization and automation.[8] This integration enabled advanced scripting hooks, allowing modifications to rendering, navigation, and content processing without altering the core codebase. The release of stable version 0.10.0 on December 24, 2004, marked a key advancement, featuring tabbed browsing (building on earlier implementations) and enhanced table rendering for better document presentation.[9] Subsequent releases, such as 0.11.7 in 2009, incorporated bug fixes and refinements to protocol handling, maintaining stability amid evolving web standards up to that point. Community developers played a vital role in ELinks' evolution, merging approximately 90% of relevant fixes from the Links 0.9x series into the ELinks codebase to ensure compatibility and robustness.[2] In a notable event reflecting maintenance challenges, OpenBSD removed ELinks from its ports tree on March 17, 2017, due to unresolved security vulnerabilities and insufficient upstream activity.[10]Current Status and Forks
In 2017, the ELinks project faced stagnation due to unresolved security vulnerabilities and lack of active maintenance, prompting developer Witold Filipczyk to fork the codebase into a new project named felinks on November 17, 2017, aimed at applying security fixes and restarting development.[3] This fork addressed critical issues, such as unpatched ECMAScript engine vulnerabilities, that had led to removals from distributions like OpenBSD earlier that year.[3] On December 1, 2020, the felinks repository was renamed back to elinks with approval from original maintainer Petr Baudis, allowing continued maintenance under Filipczyk to preserve the project's legacy name while ensuring ongoing updates.[3] The primary development now occurs on GitHub at rkd77/elinks, where Filipczyk has led regular commits since the rename, focusing on bug fixes, translation improvements, and minor enhancements to maintain compatibility with modern standards.[11] Active development persisted into 2024, with a preview release of version 0.18.0rc1 on December 7, 2024, introducing updates like bumping the Mozilla JavaScript engine to version 128 for security and compatibility, along with fixes for scripting errors and hidden element handling.[12] This was followed by the stable release of version 0.18.0 on December 26, 2024, incorporating additional security patches, such as improved redirect handling for HTTP status 308, and compatibility enhancements like ignoring unknown Hubbub parser elements.[13] ELinks maintains its position among related Links family browsers, with the original Links 0.9x series limited to bug-fix maintenance without major feature additions, while the Links 2.x variant diverges by incorporating graphical rendering capabilities but receiving infrequent updates.[14] An experimental project known as Links-hacked, which attempted to merge features from various forks, remains inactive with no recent development. As of April 2025, ELinks version 0.16.1.1-4.1ubuntu4 is included in Ubuntu's universe repository, reflecting its availability for general users, though it is absent from Red Hat Enterprise Linux 9 repositories.[15]Features and Capabilities
Core User Interface and Navigation
ELinks employs a text-based user interface designed for terminal emulators, prioritizing keyboard-driven interaction to facilitate navigation without mouse support. This setup renders web content in a linear, readable format within the terminal window, adapting to various screen sizes and resolutions through terminal capabilities. The interface includes a central document view for displaying page content, a title bar at the top showing the document title and any subpage indicators, a tab bar (visible when multiple tabs are open) for quick page switching, and a status bar at the bottom providing details such as the current URI, link information under the cursor, or cursor coordinates.[16] Tabbed browsing is a core feature that enables managing multiple documents simultaneously, introduced in the early development stages of ELinks to enhance multitasking in a text environment. Users activate a new tab with the 't' key, which opens a blank tab or loads a specified URL; alternatively, 'T' opens the current link in a background tab. Tab navigation occurs via the '<' and '>' keys to cycle through open tabs, or the Tab Menu (accessed with 'e') for more options like closing or duplicating tabs. As of version 0.18.0 (December 2024), an action to reopen the last closed tab has been added.[13] The tab bar displays abbreviated titles for each open page, allowing visual identification even in constrained terminal spaces.[16] The bookmarking system provides a structured way to save and organize frequently visited URLs, supporting hierarchical folders for categorization. Accessed primarily through the 's' key, which launches the Bookmark Manager dialog, users can add current pages via menu options, edit entries with descriptive titles and notes, or delete items as needed. Bookmarks are stored in a native format or optionally exported to XBEL for compatibility with other tools, ensuring persistence across sessions.[16] Interaction relies on a menu-driven structure with intuitive dialogs for common tasks, including options configuration, in-page searches, and file downloads. The Main Menu (invoked with Esc or F9) offers submenus for viewing source, adjusting options, and accessing tools; the Link Menu (F8) handles link-specific actions like copying or following; and dialogs appear as modal overlays for focused operations, such as entering search terms or download paths. This design promotes efficiency in text mode by minimizing keystrokes for routine actions.[16] Basic hotkeys streamline navigation and core functions, fostering a command-line-like efficiency:- g: Opens the Goto URL dialog to enter and load a specific address.
- /: Initiates an incremental search within the current page, highlighting matches as typed.
- q: Quits the current session after confirmation.
- Up/Down arrows: Moves the cursor to the next or previous link on the page.
- Enter or Right arrow: Follows the link under the cursor.
- PageUp/PageDown: Scrolls the view by full pages.
- Insert/Delete: Scrolls line by line for finer control.
Rendering and Protocol Support
ELinks operates as a text-only browser, rendering HTML content through a custom engine that supports basic structural elements without graphical output. It handles HTML tables by formatting them within the terminal's character grid, preserving layout where possible to maintain readability in a linear text format. Frames are rendered by dividing the screen into virtual sub-windows using terminal escape sequences, such as VT100 or Linux console modes, allowing users to navigate between frame contents as distinct sections rather than linearizing them into a single flow. Basic CSS support is provided for styling attributes like bold and italic text, which are mapped to terminal color and attribute capabilities; as of version 0.18.0 (December 2024), rendering skips hidden elements.[13] Layout properties like flexbox are not implemented.[16] The browser supports a range of network protocols essential for web access and file retrieval. Core protocols include HTTP and HTTPS (requiring SSL/TLS libraries like OpenSSL for secure connections), enabling browsing of standard web pages and secure sites; as of version 0.18.0 (December 2024), HTTP 308 redirects are also handled.[13] FTP is fully integrated for anonymous and authenticated file transfers, while local file access via the file:// scheme allows viewing of documents directly from the filesystem. Experimental BitTorrent support provides an internal client for peer-to-peer downloads from .torrent files, which must be enabled at compile time and is disabled by default in most builds.[16][19][20] Forms are managed interactively, with support for text fields, password inputs, textareas, checkboxes, radio buttons, select lists, and submit buttons; users can fill and submit them using keyboard navigation, with form history optionally pre-filling common fields. Links are numbered and navigable via arrow keys or direct jumps, with hyperlinks to images displayed as text placeholders (e.g., [IMG]) that can be followed to initiate downloads or launch external viewers. ELinks lacks native image rendering, instead relying on configurable MIME handlers to invoke external tools such as xv for X11-based image viewing or feh for lightweight display, integrated through mailcap files or elinks.conf settings.[16][21] An integrated download system handles file retrievals in the background, supporting resumption of interrupted transfers for protocols like HTTP, FTP, and BitTorrent by tracking partial files and continuing from the last byte position when re-initiated. This feature aids in managing large or unstable connections, with downloads saved to a user-specified directory and progress monitorable via the interface.[16][22]Scripting and Customization
ELinks provides extensive scripting support through ECMAScript (JavaScript) and Lua, enabling users to automate tasks and extend functionality beyond its core features. The ECMAScript engine, integrated via the SpiderMonkey library since version 0.11.0, allows execution of user scripts from the~/.elinks/hooks.js file, which is evaluated at startup. These scripts run with full user permissions and can interact with the browser via the global ELinks object, facilitating automation such as form filling by manipulating document elements before rendering. As of version 0.18.0 (December 2024), options like document.scripting_sleep_on_error, console.assert, and console.exit have been added for improved scripting control.[13] Lua scripting, merged from the Links-Lua project, offers similar capabilities through hooks that intercept browser events, such as URL entry or document processing, and is loaded from ~/.elinks/hooks.lua. Both scripting languages support rewriting HTML content received from the server, URL transformations, and custom protocol handling, allowing for personalized extensions like ad filtering or search enhancements.[23][8]
Hooks in ELinks enable integration with external programs for handling specific protocols or content types not natively supported. For instance, the mailto: protocol can be configured to invoke an external mail client like Mutt using the option protocol.user.mailto.unix = "mutt %h -s \"%s\"" in ~/.elinks/elinks.conf, where %h and %s placeholders insert the recipient and subject. Similarly, image viewing is delegated to external applications via MIME type handlers, such as mime.handler.image.jpeg.program = "feh %c", which opens JPEG files in the Feh viewer. These hooks extend ELinks' protocol support by piping data to user-specified tools, maintaining its lightweight nature while accommodating multimedia or email workflows.[21]
Key bindings can be fully customized to remap commands and adapt the interface to personal preferences, using the bind directive in ~/.elinks/elinks.conf. Bindings are organized by keymaps like main for browsing or menu for navigation, with syntax such as bind main Ctrl-R = redisplay to assign the redisplay action to Ctrl-R. Users can unbind defaults with = none or define new shortcuts for actions like viewing images (view-image) or searching (search), supporting modifiers like Ctrl-, Alt-, and special keys including function keys F1-F12. This flexibility allows tailoring workflows, such as Vi-like navigation or quick access to scripts.[17]
Dialog and menu appearances are modifiable through configuration options in elinks.conf, affecting colors, styles, and behaviors without scripting. Options like ui.colors.color.dialog.text = "lightgray black" set foreground and background colors for dialog elements, while ui.menu.type = 0 toggles between full-screen or layered menu displays. Menu items can be reordered or hidden via ui.menu.hidden = 1 for specific entries, enabling streamlined interfaces. These tweaks enhance usability by aligning the text-based UI with user aesthetics and efficiency needs.[21]
Representative examples illustrate scripting's power: A Lua hook for "filtering crap" uses string.gsub to remove unwanted HTML elements, such as ad columns from sites like LinuxToday, by targeting specific tags during the pre_format_html_hook. For enhanced search, the "go to URL on steroids" Lua script rewrites dialog input like ",gg unix browsers" into a Google query URL via pattern matching and substitution. ECMAScript equivalents can automate form pre-filling, for instance, by accessing ELinks.current_url and injecting values into form fields before submission. These scripts, available in the source distribution's contrib/lua/ and contrib/smjs/ directories, demonstrate how users create ad-blocking filters or integrated search tools.[24][23]
Technical Details
Architecture and Implementation
ELinks is implemented primarily in C, specifically adhering to the C89 standard to ensure broad portability across systems. This choice facilitates its lightweight nature and compatibility with resource-constrained environments. For ECMAScript support, ELinks integrates Mozilla's SpiderMonkey engine, which incorporates C++ components to handle JavaScript parsing and execution, though this feature is optional and requires specific build configurations.[18][25] The codebase follows a modular architecture, dividing functionality into distinct components for HTML parsing, document rendering, network handling, and terminal-based user interface management. It supports asynchronous processing to maintain responsiveness. This modularity enables targeted development and maintenance of individual features, such as protocol handlers that interface with the rendering engine.[3] The HTML parser is a custom-built engine designed to tolerate quirks in legacy web content, outputting formatted text for reliable rendering in text mode.[3] At its core, ELinks operates on an event-driven model that processes terminal input and network events through callbacks, supporting an asynchronous philosophy where operations like URL fetching do not halt user interaction. This approach optimizes responsiveness in low-bandwidth or intermittent network scenarios.[3] The build system relies on Autotools, utilizing aconfigure script to detect system capabilities and generate Makefiles for compilation. For modern Unix builds, Meson is the primary system, with steps like meson setup build && meson compile -C build. Optional dependencies include libraries like libcurl for alternative implementations of protocols such as FTP, FTPS, and SFTP (enabled via configuration options like protocol.ftp.use_curl = 1), allowing builders to customize networking behavior without altering the core codebase. Compiled binaries are compact, typically ranging from 500 KB to 2 MB depending on enabled features, emphasizing optimization for low-resource deployments.[26][27][28][29]
Platform Compatibility and Installation
ELinks is primarily designed for Unix-like operating systems, including Linux distributions and BSD variants such as FreeBSD, where it has been widely ported and maintained. It also supports DOS and Windows platforms through native ports or compatibility layers like Cygwin, enabling text-mode operation on these legacy and non-Unix environments.[3][30] Installation on Unix-like systems is commonly achieved via distribution-specific package managers. On Debian-based distributions like Ubuntu, users can install ELinks using the APT package manager with the commandsudo apt install elinks, which pulls in the latest available version from the repositories. Fedora and related systems support installation via DNF (or YUM on older releases), as ELinks is included in the standard repositories up to recent versions. However, it is notably absent from the base repositories of Red Hat Enterprise Linux 9 (RHEL9), requiring alternative sources or compilation for those environments. FreeBSD users can install it through the ports collection or pre-built packages managed by the ports system.[31][15]
For systems without pre-built packages or to customize the build, ELinks can be compiled from source. The process requires a C compiler such as GCC and GNU Make (version 3.78 or later), along with the Meson build system for modern builds or Autotools for legacy compatibility. Optional libraries enhance functionality, including GPM for mouse support in terminals and OpenSSL or GnuTLS for HTTPS protocol handling. Compilation typically involves running ./configure && make && make install for Autotools or the Meson equivalent (meson setup builddir && meson compile && meson install), after which the binary is placed in the system path.[32][26][32]
Binary packages are available through GitHub releases from the official fork, providing source tarballs and occasional pre-built binaries for major Linux distributions up to version 0.18.0 (as of December 2024), though users should verify compatibility with their specific setup.[4]
ELinks offers full compatibility with standard terminal emulators such as xterm and screen, ensuring reliable operation in console environments. It has limited support for modern high-DPI displays without manual terminal adjustments, as rendering is constrained by text-mode constraints.[33][1]
Runtime requirements for ELinks are minimal, allowing it to run on resource-constrained systems with as little as 4 MB of RAM and no graphical user interface, making it suitable for embedded or legacy hardware.[1]