Linux terminal web browser

Browsing the web from the Linux terminal

Browsing the web from Linux terminal with lynx:

Let’s begin with the lynx console web browser, it is important to clarify this is the only terminal web browser in this article which doesn’t support mouse integration.

To begin installing the terminal web browser lynx, on Debian and based Linux distributions run:

Once installed using lynx is pretty easy, just call the program and specify the website you want to browse by running:

Despite lynx being simple, it isn’t as intuitive as it seems, instead of using the arrow keys from your keyboard to move from one place to other, use the SPACE key on your keyboard to move down and the B key to move up. When you reach the section, you want to browse into, just press ENTER.

If you want to go back to the previous page you can press your left arrow key on your keyboard, to go forward press the right arrow key on the keyboard.

By pressing the M key, you can go to the website homepage, a confirmation will be requested as shown in the screenshot below:

You can get more usage tips on lynx online at https://linux.die.net/man/1/lynx.

Browsing the web from Linux terminal with links:

Links is another great option to browse the web from the terminal, and it supports mouse integration.

To begin installing links terminal web browser on the terminal run:

Like with lynx and the rest of terminal web browsers call the program specifying the destination website with the following syntax:

The site will show up with a Welcome screen from links, press ENTER to close the welcome screen and get the website:

Press ENTER to OK and the website will show up:

As said previously, links supports mouse integration, if present, and you can use it to click on any section of the website you can to visit. As with Lynx, you can use the left arrow and right arrow keys on your keyboard to move a page back or a page forward.

By pressing the ESC key, you can display the main menu shown on the top of the screenshot below:

This main menu includes:

File: this menu includes the options go back, go forward, history, reload, bookmarks, new window, save as, save url as, save formatted document and kill background or all connections and flush the cache.

View:
this submenu includes the options search, search backward, find next, find previous, toggle html/plain, document info, header info, frame at full-screen, save clipboard to a file, load clipboard from a file, html options and save html options.

Link: this submenu includes options follow link enter, open in new window and download link.

Downloads: here you are able to see the downloaded and downloading files.Setup: here you are able to specify language, terminal options, margins, cache, options associated with mail and telnet, blocked images and additional options.

Читайте также:  Intel core i3 3220 драйвера windows 10

Help: this is the help submenu.

Browsing the web from Linux terminal with links2:

As done with previous web browsers to install links2 on Debian based Linux distributions run:

Then, once installed, on the terminal call the program specifying the website:

Then the shite will show up:

Like its predecessor links, links2 also supports mouse integration and the use of keys are the same for links and links2 including the ESC key to display the main menu bar.

There are more options available for links you can read at its man page: https://linux.die.net/man/1/links2.

Browsing the web from Linux terminal with Elinks:

Elinks is the last web browser of this article, to install it on the console run:

Then run it specifying the website as shown below:

Like with links and elinks, you can display a similar main menu on elinks by pressing the ESC key.

Elinks usage is similar, you can use the left and right keys on your keyboard to go back and forward, press ENTER on the item you can enter. Also elinks supports mouse integration like links and links2.

I hope you found this tutorial on Browsing the web from Linux terminal useful. Keep following LinuxHint for more tips and updates.

About the author

David Adams

David Adams is a System Admin and writer that is focused on open source technologies, security software, and computer systems.

Источник

You can Surf Internet in Linux Terminal With These Command Line Browsers

Last updated September 1, 2021 By Ankush Das 47 Comments

I’m guessing that you are probably using Firefox or a Chrome-based browser like Brave to read this article. Or, maybe, Google Chrome or Chromium or other web browsers available for Linux.

In other words, you are utilizing a GUI-based approach to browse the web. However, back in the days, people used the terminal to fetch resources and browse the web because everything was mostly text-based information.

Even though you cannot get every information from a terminal now, you can still try the command line browsers for some text-based information and open a web page from the Linux terminal.

Not just limited to that, but if you are accessing a remote server or stuck in a terminal without a GUI, a terminal web browser can prove to be useful as well.

So, in this article, I will be mentioning some terminal based web browsers that you can try on Linux.

Best Terminal-based Web Browsers for Linux Users

Note: The list is in no particular order of ranking.

1. W3M

w3m is a popular open-source text-based web browser for the terminal. Even though the original project is no longer active, an active version of it is being maintained by a different developer Tatsuya Kinoshita.

w3m is quite simple, supports SSL connections, colors, and in-line images as well. Of course, depending on what resource you are trying to access, things might look different on your end. As per my quick test, it didn’t seem to load up DuckDuckGo but I could use Google in terminal just fine.

You can simply type w3m in the terminal to get help after installation. If you’re curious, you can also check out the repository at GitHub.

How to install and use w3m?

W3M is available on most of the default repositories for any Debian-based Linux distribution. If you have an Arch-based distro, you might want to check AUR if it’s not available directly.

For Ubuntu, you can install it by typing in:

Here, we are installing the w3m package along with image extension for in-line image support. Next, to get started, you have to simply follow the command below:

Читайте также:  Файлы linux под windows

Of course, you need to replace xyz.com to any website that you want to browse/test. Finally, you should know that you can use the keyboard arrow keys to navigate and press enter when you want to take an action.

To quit, you can press SHIFT+Q, and to go back to the previous page — SHIFT+B. Additional shortcuts include SHIFT + T to open a new tab and SHIFT + U to open a new URL.

You can explore more about it by heading to its man page as well.

2. Lynx

Lynx is yet another open source command line browser which you can try. Fortunately, more websites tend to work when using Lynx, so I’d say it is definitely better in that aspect. I was able to load up DuckDuckGo and make it work.

In addition to that, I also noticed that it lets you accept/deny cookies when visiting various web resources. You can set it to always accept or deny as well. So, that’s a good thing.

On the other hand, the window does not re-size well while using it from the terminal. I haven’t looked for any solutions to that, so if you’re trying this out, you might want to do that. In either case, it works great and you get all the instructions for the keyboard shortcuts right when you launch it in the terminal.

Note that it does not match the system terminal theme, so it will look different no matter how your terminal looks like.

How to install Lynx?

Unlike w3m, you do get some Win32 installers if you’re interested to try. But, on Linux, it is available on the most of the default repositories.

For Ubuntu, you just need to type in:

To get started, you just have to follow the command below:

Here, you just need to replace the example website with the resource you want to visit.

If you want to explore the packages for other Linux distros, you can check out their official website resources.

3. Links2

Links2 is an interesting text-based browser that you can easily utilize on your terminal with a good user experience. It gives you a nice interface to type in the URL and then proceed as soon as you launch it.

It is worth noting that the theme will depend on your terminal settings, I have it set as “black-green”, hence this is what you see. Once you launch it as a command line browser, you just need to press any key to bring the URL prompt or Q to quit it. It works good enough and renders text from most of the sites.

Unlike Lynx, you do not get the ability to accept/reject cookies. Other than that, it seems to work just fine.

How to install Links2?

As you’d expect, you will find it available in the most of the default repositories. For Ubuntu, you can install it by typing the following command in the terminal:

You can refer to its official website for packages or documentations if you want to install it on any other Linux distribution.

eLinks is similar to Links2 — but it is no longer maintained. You will still find it in the default repositories of various distributions, hence, I kept it in this list.

It does not blend in with your system terminal theme. So, this may not be a pretty experience as a text-based browser without a “dark” mode if you needed that.

Читайте также:  Mips linux kernel image

On Ubuntu, it is easy to install it. You just have to type in the following in the terminal:

For other Linux distributions, you should find it available on the standard repositories. But, you can refer to the official installation instructions if you do not find it in the repository.

Wrapping Up

It’s no surprise that there aren’t a lot of text-based web browsers to run on the terminal. Some projects like Browsh have tried to present a modern Linux command-line browser but it did not work in my case.

While tools like curl and wget allow you to download files from the Linux command line, these terminal-based web browsers provide additional features.

In addition to command-line browsers, you may also like to try some command line games for Linux, if you want to play around in the terminal.

What do you think about the text-based web browsers for Linux terminal? Feel free to let me know your thoughts in the comments below.

Like what you read? Please share it with others.

Источник

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.

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

Sample Output

To confirm that it is installed

Sample Output

To go to a website run. w3m url For example

Output

When using Xterm, you can even view images!!

In the example below, I searched for Royal Wedding


To open new tabs

To go back one page

To type a new URL,

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

Sample output

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

Output

To launch Lynx, run

Output

To go to a URL, run. lynx url

Type Y to continue

3) Links2 tool

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

Sample Output

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

Sample Output

TO visit a site, run links2 url

Output

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

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

Sample Output

To visit a site type elinks url

Press ‘Enter’ to continue.

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.

Источник

Оцените статью