Four Web Browsers for the Linux Command Line

Linux Command Line Browser

Remember the days when the web was as simple as searchable text. The terminals and low powered personal computers were enough to access the text-based web over snail-paced internet connections. Of course, people then used the command-line web browsers to visit the web; these included the famous Lynx browser as well. Times have changed now, the browser technology has shifted to the graphical and more powerful web-browsers such as Chrome, Firefox and, Safari. Still, there are people who are more Terminal savvy and prefer accessing to-the-point information from the web through Terminal based browsing. Even Terminal based computers also exist and for them, command-line browsers are sometimes the only way to connect to the web. So how do we install and use these text-based browsers through our Linux command-line, the Terminal?

This article gives you four ways to use the web through the Linux Terminal by explaining ways to install and use the Terminal as a web-browser.

We have run the commands and procedures mentioned in this article on an Ubuntu 18.04 LTS system.

If you are already Terminal savvy, you wouldn’t have any problem in opening the Terminal. You can open it through the Dash or by pressing the Ctrl+Alt+T shortcut. You can then install one of the following popular tools in order to browse the internet through the command line:

  • The w3m Tool
  • The Lynx Tool
  • The Links2 Tool
  • The Elinks Tool

The w3m Web Browser

Installation

Enter the following command in the Terminal in order to install the w3m utility:

$ sudo apt-get install w3m w3m-img

Installing W3m

Enter Y when the system prompts you to continue installation. The command line browser w3m will be successfully installed to your system.

Verifying the installation

You can verify the installation by checking the version number of w3m as follows:

$ w3m -version

Check w3m version

Browsing the Internet

You can browse the Internet through the w3m utility by following this syntax:

Syntax:

$ w3m [URL]

Example:

$ w3m www.google.com

When you enter this command in your Terminal, the output will give you the following display:

Google in command line browser on Linux

You can access a link or move to the search bar simply by double-clicking it. In this example, I have searched for Portugal weather; double-clicking the Google Search link has displayed the search results in the following manner:

Using Google search in w3m

Here are some basic operations you can perform on this utility:

Quit the program: Shift+Q

Open a new tab: Shift+T

Open a new URL: Shift+U

Go back one page: Shift+B

The Lynx Web Browser

Installation

Enter the following command as root in the Terminal in order to install the Lynx utility:

$ sudo apt-get install lynx

Installing Lynx Browser

Enter Y when the system prompts you to continue installation. The command line browser Lynx will be successfully installed on your system.

Verifying the installation

You can verify the installation by checking the version number of Lynx as follows:

$ lynx -version

Check Lynx version

Browsing the Internet with Lynx

You can browse the Internet through the Lynx utility by following this syntax:

Syntax:

$ Lynx [URL]

Example:

Lynx www.google.com

When you enter this command in your Terminal, the output will give you the following display;

you can use the arrow keys to move to the various links on the page.

Using Google with Lynx on Command Line

In this example, I have tried searching for the weather of New York City. The search results are displayed when I hit return.

The Links2 Web Browser

Installation

Enter the following command in the Terminal as root in order to install the Links2 utility:

$ sudo apt-get install links2

Installing link2 Browser

Enter Y when the system prompts you to continue installation. The command line browser Links2 will be successfully installed on your system.

Verifying the installation

You can verify the installation by checking the version number of Links2 as follows:

$ links2 -version

Check links2 version

Browsing the Internet

You can browse the Internet through the Links2 utility by following this syntax:

Syntax:

$ links2 [URL]

Example:

$ links2 www.google.com

When you enter this command in your Terminal, the output will give you the following display:

Using the web with links2 browser

You can access a link or move to the search bar simply by double-clicking it. In this example, I have searched for USA news; double-clicking the Google Search link will display the corresponding search results.

The eLinks Web Browser

Installation

Enter the following command in the Terminal as root in order to install the eLinks utility:

$ sudo apt-get install elinks

Installing elinks

Enter Y when the system prompts you to continue installation. The command line browser eLinks will be successfully installed on your system.

Verifying the installation

You can verify the installation by checking the version number of elinks as follows:

$ elinks -version

Check elinks

Browsing the Internet

You can browse the Internet through the eLinks utility by following this syntax:

Syntax:

$ elinks [URL]

Example:

$ elinks www.google.com

When you enter this command in your Terminal, the output will give you the following display:

Using Google search with elink

You can then search for a keyword or string through this search engine.

Note: The terminal emulator Xterm also has the capability to display images in the search results.

Through the four command line tools mentioned in this article, you can easily browse the Internet without using the graphical web browsers on your Ubuntu system. Now you can enjoy faster text-based browsing without worrying about the ads, javascript, and unwanted images. Install whichever browser suits you from the list and enjoy hassle-free Internet browsing!