4 Tools to Browse Internet from Linux Terminal

In this article, we'll focus on how you can browse the internet from Linux command line using text-based browsers. Text browsers are browsers that only render the text contents of a web page, leaving out all the graphical content including CSS and Javascript. This makes these browsers faster and consume less bandwidth. On the downside, however, the browsing experience is quite dull as no images & videos are displayed unlike conventional web browsers like Firefox and Google Chrome. We'll take a look at 4 text-based browsers on Ubuntu 18.04 terminal.

  • w3m
  • Lynx
  • Links2
  • Elinks

1) w3m tool

W3m is a text-based browser tool that can be used to browse the internet on a Linux terminal. We are going to see how it can be used to browse web pages.
To begin with, we need to install w3m package

apt-get install w3m w3m-img

Sample Output

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libid3tag0 libimlib2
Suggested packages:
cmigemo dict dict-wn dictd libsixel-bin mpv w3m-el xsel
The following NEW packages will be installed:
libid3tag0 libimlib2 w3m w3m-img
0 upgraded, 4 newly installed, 0 to remove and 629 not upgraded.
Need to get 1,437 kB of archives.
After this operation, 3,270 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

To confirm that it is installed

dpkg -l w3m

Sample Output

||/ Name                 Version         Architecture    Description
+++-====================-===============-===============-==============================================
ii  w3m                  0.5.3-26ubuntu0 amd64           WWW browsable pager with excellent tables/fram

To go to a website run. w3m url For example

w3m www.google.com

Output

browse the internet from command line

When using Xterm, you can even view images!!

In the example below, I searched for Royal Wedding

browse the internet on command line
To open new tabs

shift + T

browse the internet from command line

To go back one page

shift + B

To type a new URL,

shift + U

next type the URL and press Enter.

2) Lynx tool

This is another text-based browser designed under  GNU GPLv2 license. To install Lynx, run

apt-get install lynx-cur

Sample output

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  lynx lynx-common
The following NEW packages will be installed:
  lynx lynx-common lynx-cur
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,038 kB of archives.
After this operation, 2,792 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y

Once the installation is complete, we need to confirm that the installation went right. run

dpkg -l lynx

Output

||/ Name                                 Version                 Architecture            Description
+++-====================================-=======================-=======================-=============================================================================
ii  lynx                                 2.8.9dev8-4ubuntu1      amd64                   classic non-graphical (text-mode) web browser

To launch Lynx, run

lynx

Output

browse the internet on command line

To go to a URL, run.lynx url

For example,

lynx www.google.com

Type Y to continue

browse the internet on command line

3) Links2  tool

This is a graphical web browser that supports mouse and clicking. To  install links2 tool

apt-get install links2

Sample Output

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  fontconfig fontconfig-config libcairo2 libcroco3 libdatrie1
  libdirectfb-1.2-9 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2
  libdrm-radeon1 libfontconfig1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common
  libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgraphite2-3 libharfbuzz0b
  libice6 libllvm5.0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0
  libpciaccess0 libpixman-1-0 librsvg2-2 librsvg2-common libsensors4 libsm6
  libthai-data libthai0 libtxc-dxtn-s2tc0 libx11-xcb1 libxaw7 libxcb-dri2-0
  libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shape0
  libxcb-shm0 libxcb-sync1 libxcomposite1 libxdamage1 libxfixes3 libxft2
  libxi6 libxinerama1 libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1
  libxt6 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 x11-utils xbitmaps xterm

Once the installation is complete, we need to confirm that the installation went right. run

dpkg -l links2

Sample Output

||/ Name                                 Version                 Architecture            Description
+++-====================================-=======================-=======================-=============================================================================
ii  links2                               2.12-1                  amd64                   Web browser running in both graphics and text mode

TO visit a site, run links2 url

For example,

links2 www.google.com

Output

browse the internet using command line

Feel free to search for anything in the search bar. In this case, I searched for Bionic Beaver which is the latest Ubuntu version at the time of writing this

browse the internet on command line

4) eLinks  tool

Finally, we have the eLinks command line tool which is used similar to other text-based browsers. To install run

apt-get install elinks

Sample Output

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  elinks-doc
The following NEW packages will be installed:
  elinks

To visit a site type elinks url

For example

elinks www.google.com

browse the internet on command line

Press 'Enter' to continue.

browse the internet on command line

Now you can proceed to search your topic.

We have looked at a few text-based browsers that geeky and terminal savvy users can use to access the internet. We welcome you to try one or two and give us your thoughts. Thank you.

Jamie Arthur 12:05 am

About Jamie Arthur

James is a passionate Linux and Windows Systems Administrator with 4 years of experience in Linux, databases and Front-End development. He loves doing research on different Linux distributions and experimenting with installation and configuration of different services and features. His hobbies include swimming, reading novels and playing video games.

Author's All Posts
Like to become part of Linoxide Team and contribute tips? Contact us here.

Comments

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.