elinks Command in Linux



Elinks is a text-based fast and efficient web browser that enables users to browse the web and access web content without a graphical interface. It is a popular browser among Linux distributions that enhances the command-line experience. Other than Linux distributions, it can also be installed on Windows and DOS.

Table of Contents

Here is a comprehensive guide to the options available with the elinks command −

Elinks is an extended version of the original Links web browser. The name "Elinks" stands for "Extended Links", which reflects its enhanced features and improvements over the original Links browser. Elinks doesn’t come pre-installed on most Linux distributions, however it can be easily installed using a suitable package manager from the distribution’s main repository.

We can install elinks on Debian based systems using the apt package manager −

sudo apt install elinks
elinks Command in Linux 1

Let’s confirm the elinks’ installation on Ubuntu by running the following command −

elinks --version
elinks Command in Linux 2

To install this web browser on Red-Hat based distributions, we can use the dnf package manager as follows −

sudo dnf install elinks

Similarly, we can use the Pacman package manager to install this browser on Arch Linux −

sudo pacman -S elinks

Before moving on to the usage of elinks, let’s first explore the manual page of this command to get a better understanding −

man elinks

The manual page contains all the essential information regarding this browser, such as synopsis, description, valid options, environment variable, etc −

elinks Manual Page

The elinks command accepts several options; among them, the most commonly used are listed in the following table −

Option Description
-help It shows the help page that contains information about all valid options.
-version It retrieves all the information regarding the installed version of elinks.
-cookies <file> It stores the cookies within the specified file.
-no-numbering It disables the link numbering in dump output.
-no-references It disables the printing of link references in the dump output.
-remote It controls an existing/running elinks instance.

Elinks supports multiple navigation and shortcut keys for efficient browsing in a text-based environment −

Keys Description
Arrow keys Navigate left, right, up or down through the links or text.
Enter key It is used to follow a link or submit a form.
Backspace Key It navigates back to the previous page.
Tab key It switches between the links on the page or form elements.
CTRL + G It navigates to a specific URL.
CTRL + L It navigates to a new URL.
CTRL + Q It is used to quit Elinks.
Space It is used to select or deselect a checkbox or radio button.
/ It is used to search for text in the current page.
r It reloads the current page.
x It closes the active tab or window if the browser supports multiple windows.

Follow the below-listed stepwise instructions to use the elinks command in Linux −

Prerequisite Step: Install Elinks

Elinks is not pre-installed by default in many Linux distributions, so you generally need to install it manually before use.

Step 1: Launch Elinks Browser

Write “elinks” in the terminal and hit Enter key to open the Elinks browser −

elinks

As soon as, we hit the Enter key, we are navigated to the following window −

Launch Elinks Browser

Press enter key to continue browsing or hit ESC key for menu.

Step 2: Access a Website

Now type a URL that you want to visit and hit OK to navigate to that website. For instance, we specify the complete address of the website, i.e., www.tutorialspoint.com to access it −

Access Website elinks Command 1

When we hit the Enter key we are navigated to the following page −

Access Website elinks Command 2

From the output snippet, you can observe that the website has been successfully loaded without the graphical interface. Now you can use the arrow keys to access a specific link, page, category, etc. of the selected website.

Step 3: Add a Bookmark

We add a bookmark by pressing the s key. When we press s key on the keyboard, it navigated us to the Bookmark manager −

Add Bookmark elinks Command 1

Let’s use the right arrow key to select the “Add” option. Hit ENTER key and you will be navigated to the add bookmark page; specify the name and URL for the bookmark −

Add Bookmark elinks Command 2

After specifying the Name and URL, press the ENTER key to add the bookmark.

Step 4: In Page Searching

Press “/” key on the keyboard to initiate an in-page search, then type the term you want to locate within the page. For example, we search for the term “Google” in the current page −

In Page Searching elinks Command 1

Upon hitting the Enter key, the searched terms will be highlighted as follows −

In Page Searching elinks Command 2

Step 5: View Browser History

To check the history in the Elinks browser, press Esc to open the menu, navigate to File > History, or we can simply press h to view a list of previously visited URLs −

Browser History elinks Command

Step 6: Navigate to a Specific URL

Hit the g key on your keyboard to navigate to open the “Go to URL” page −

Navigate to a Specific URL elinks Command 1

Specify the URL that you want to access and then press the ENTER key to navigate to it −

Navigate to a Specific URL elinks Command 2

Step 7: Quit Elinks Browser

To quit the elinks browser, simply press q on the keyboard, as a result, the following confirmation dialog box pops up. Select yes using the arrow keys and press enter to close the elinks browser −

Quit Elinks Browser elinks Command

That’s all about the usage of the Elinks browser in Linux.

Conclusion

Elinks is a text-based web browser that allows users to browse the internet without a graphical interface, enhancing the command-line experience. It is a lightweight, text-based web browser for Linux, ideal for low-resource situations, automation, and server management due to its efficiency and scriptability.

Although it is not pre-installed on most Linux distributions, it can be easily installed using a package manager. In this post, we covered how to install Elinks on various Linux distributions, explored its manual page, and demonstrated its key functionalities such as navigating websites, bookmarking, searching within pages, viewing browser history, and quitting the browser.

Advertisements