W3m, a lightweight text-based web browser for the terminal

about w3m

In the next article we are going to take a look at W3m. This is a text-based web browser, which looks a lot like Lynx and has support for tables, frames, SSL connections, mouse usage, etc. As a general rule, this browser tries to render the pages as faithful as possible. It is also possible to use it within emacs.

Sometimes users do not have or do not want a graphical interface to work. Either because the operating system does not have the graphical environment available, or simply because you are a fan of the terminal, whatever the reason, there are times when a browser from the terminal can be very helpful.

If you are looking for a text-based web browser to use from the terminal and Lynx doesn’t quite convince you, W3M may be a good alternative. This is a modern text-based terminal web browser for Gnu / Linux it has a lot to offer. In the following lines we are going to see how to install W3M in Ubuntu and how to start using it.

Install W3M on Ubuntu

This text-based web browser it is not pre-installed on any Gnu / Linux operating system (far as I know). For this reason, we are going to start by installing it on Ubuntu. To do this we will only need to open a terminal (Ctrl + Alt + T). Once the terminal window is open and ready to be used, in Ubuntu the web browser W3M can be easily installed with the following command:

install w3m

sudo apt install w3m

A basic use of W3M in Ubuntu

To start using this web browser, we just have to open a terminal (Ctrl + Alt + T) and follow the following steps.

google on w3m

Visit websites with W3M

If you are interested in viewing a website with W3M, we will not need more than run the command w3m together with Url what do we want to visit.

It should also be clarified that W3m does not show the “style” of the page (usually saved in .css files) but its basic structure made in HTML. This is why some pages tend to seem strange: with the menus as very long lists, the bars that are shown on the pages to one side may appear lower, etc.

For example, to see ubunlog.com, we must write the following command in the terminal:

w3m running

w3m https://ubunlog.com

After running the above command, let’s see the basic text-based Ubunlog.com home page load. We will can use the keyboard to move through the different places on the page and the Enter key to confirm our selectionWe will also have the possibility of using the mouse if we use this browser from the terminal’s desktop application.

We can write text by pressing Enter on the areas to be completed. These areas are normally found in square brackets «[_ _ ]«. Then a small bar will appear in the last line of the program with the indication «TEXT:«, In that line we can write what we need and pressing again Enter, that text is written in the selected area. This is used to write users, passwords, comments, etc.

If during navigation we select a link to a downloadable file, in the last line of the program the name of the file and the path in which it is going to be saved will appear. Once the download has started, a bar will indicate the progress.

When we want to exit this program, we will only need to press the q key on the keyboard, and confirm the exit by pressing «Y«.

More information

In addition to the basic concepts that we have just seen in these lines, W3M offers much more. For this reason, if any user wants to know more about W3M, they can read the manual. To keep an eye on it, we will only have to type in the terminal (Ctrl + Alt + T) the command:

man w3m

It also can get more information about the use of this browser using in the same terminal:


w3m -help

This program can be very useful, in different cases and situations. But this depends on each user.

Add Comment