In today's world of graphical user interfaces (GUIs), it's easy to forget the raw power and efficiency of the command line. While browsing the web with Firefox or Chrome is the norm, did you know you can also surf the internet directly from your Linux terminal?
This article explores the world of text-based web browsers, offering a unique and often overlooked method for accessing online resources. Whether you're managing a remote server, troubleshooting network issues, or simply want to experience a different way of interacting with the web, command-line browsers can be surprisingly useful.
You might be wondering, "Why would I want to browse the web in a terminal?" Here are a few compelling reasons:
Here's a rundown of some of the best terminal-based web browsers available for Linux:
W3M is a classic, open-source text-based browser known for its simplicity and versatility. It supports SSL connections, color, and even inline images (with the appropriate extension).
sudo apt install w3m w3m-img
w3m example.com
Enter
to follow links, SHIFT+Q
to quit, SHIFT+B
to go back, SHIFT+T
to open a new tab, and SHIFT+U
to open a new URL.While the original project is no longer actively maintained, a vibrant fork by Tatsuya Kinoshita keeps W3M alive and kicking.
Lynx is another popular and long-standing command-line browser that boasts excellent website compatibility. It handles cookies well, allowing you to accept or reject them as needed.
sudo apt install lynx
lynx example.com
When launched, Lynx provides a helpful overview of keyboard shortcuts for easy navigation. For other Linux distributions, check the official Lynx resources.
Links2 offers a user-friendly experience with a clean interface. Simply launch it, and a URL prompt appears, ready for your input. The appearance of Links2 is influenced by your terminal settings.
sudo apt install links2
Q
to quit.While it renders text effectively, Links2 lacks the cookie management features found in Lynx. Installation packages and documentation for other distributions can be found on the official Links2 website.
eLinks is similar to Links2 but is no longer actively maintained. However, it's often available in default repositories, making it accessible for those who want to try it. Keep in mind that eLinks doesn't blend with system terminal themes, potentially leading to a less visually appealing experience.
sudo apt install elinks
Installation instructions for other distributions can be found on the official eLinks documentation page.
While these terminal browsers offer a way to view web pages, other command-line tools like curl
and wget
are excellent for downloading files. You can learn more about them in this article on downloading files from the Linux command line.
Command-line web browsers may not be for everyone, but they provide a unique and powerful way to interact with the web, especially in environments where GUI tools are unavailable or impractical. So, next time you're working in the terminal, consider giving one of these browsers a try – you might be surprised at what you discover. And if you're looking for more fun in the terminal, check out these awesome Linux command-line games!