Browsh
What is Browsh?¶
Browsh is a modern, text-based browser that renders in a terminal environment. Unlike traditional text-based browsers like Lynx or w3m, which can only handle basic HTML, Browsh can render anything a modern graphical browser can. This includes HTML5, CSS3, JavaScript, videos, and even WebGL content.
It achieves this by using a real browser engine (Mozilla Firefox) in headless mode to render a web page. It then converts the graphical output into UTF-8 characters and ANSI escape codes that can be displayed in a terminal. This makes it an incredibly powerful tool for accessing the modern web from environments without a graphical user interface (GUI).
The primary goal of Browsh is to significantly reduce bandwidth and improve browsing speeds on slow internet connections while still providing access to the full complexity of today's websites.
Key Features¶
- Full Modern Web Support: Renders complex, JavaScript-heavy sites, videos, and WebGL.
- Bandwidth Saver: Ideal for slow, unreliable, or expensive internet connections as only text data is sent to the terminal client.
- Remote Access: Use it over SSH to browse the web on a remote machine without needing X11 forwarding, VNC, or RDP.
- Reduced Distractions: Presents web content in a simplified, text-focused format.
- Low Memory Usage: The client-side terminal component is very lightweight.
How It Works¶
Browsh acts as a client that communicates with a web extension running inside a headless Firefox instance.
- Firefox, running in the background, loads and renders the requested web page.
- The Browsh web extension converts the rendered page into a simplified text-based representation.
- This text data is sent to the terminal client, which displays it.
- User interactions (keystrokes, mouse clicks) are sent back to the headless Firefox instance to interact with the page.
Installation¶
The simplest way to install Browsh is to download the appropriate binary for your system from the official website.
Example for Linux (64-bit):
# Browsh
wget [https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_amd64.rpm](https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_amd64.rpm)
# Install using your package manager (example for .rpm)
sudo rpm -i browsh_1.6.4_linux_amd64.rpm
# For Debian/Ubuntu (.deb)
wget [https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_amd64.deb](https://github.com/browsh-org/browsh/releases/download/v1.6.4/browsh_1.6.4_linux_amd64.deb)
sudo dpkg -i browsh_1.6.4_linux_amd64.deb
sudo apt-get install -f # To install dependencies
Note: You must have a recent version of Mozilla Firefox installed for Browsh to function.
Usage¶
Basic Command¶
To start Browsh and navigate to a specific URL, use the following command:
Bash
Example:
Bash
If you run browsh without a URL, it will open to your default homepage.
Keybindings¶
Browsh uses keybindings that are similar to those found in standard graphical browsers.
| Key | Action |
|---|---|
Ctrl + q |
Quit Browsh |
Ctrl + l |
Focus the URL bar |
Backspace |
Go back in history |
Ctrl + r |
Reload the page |
Arrow Keys |
Scroll the page |
PageUp |
Scroll up a full page |
PageDown |
Scroll down a full page |
Tab |
Cycle through links and inputs |
Shift + Tab |
Cycle backwards |
Enter |
Click a link or button |
Ctrl + t |
Open a new tab |
Ctrl + w |
Close the current tab |
Ctrl + Tab |
Switch to the next tab |
Example Scenario: Browsing on a Remote Server¶
Imagine you are connected to a remote server via SSH and need to look up documentation on a website to solve a problem. You don't have a GUI on the server.
-
SSH into your server:
Bash
-
Start Browsh and search for the information:
Bash
-
Once the page loads, press
Tabuntil the search bar is highlighted. -
Type your search query, for example, "linux file permissions", and press
Enter. -
Use the
Arrow KeysorPageDownto scroll through the search results. -
Use
Tabto navigate to the link you want to open and pressEnterto view the page. -
When you are finished, press
Ctrl+qto exit Browsh and return to your shell prompt.