
Call web pages in the terminal with Browsh
Block Graphics
A graphical user interface is not always available (e.g., when working with secure shell (SSH) on a remote server), and in some areas, data merely drips from the Internet. If you want to save bandwidth or work at the command line, you will appreciate a pure text browser. Browsh takes this one step further and even converts images and videos into characters. For this to work, the browser relies on a well-known friend in the background: Firefox.
Shell Fan
Many Linux users prefer the command line to a graphical user interface. If you are a die-hard shell fan and want to look up something on the Internet, web browsers like the classic Lynx that only deliver plain text on a page can help – and save bandwidth in the process. However, you lose the layout and images.
A modern text browser composes a web page completely from text characters [1], keeping the layout to a large extent. The software even tries to display graphics and animation consisting of individual color blocks (Figure 1). In many cases, you can at least guess the appearance of the graphic.

The software supports all modern web technologies, including HTML5, CSS3, JavaScript, and even WebGL. Developer Thomas Buckley-Houston sees the main use of the program in work sessions on a remote server. If you access Browsh with SSH or the alternative Mosh, you can access the web with the locally installed browser. Because Browsh only transfers text, the total volume of data to be transferred is reduced, boosting the transfer speed.
Test Drive
If you only want to try Browsh out first, simply add another URL to the address https://html.brow.sh/ and call the complete construct in a normal web browser:
https://html.brow.sh/http://www.linux-magazine.com/
After a few seconds, you will see the corresponding website as Browsh would display it (Figure 2). Complementary to html.brow.sh
is the domain text.brow.sh
, which delivers a display that contains only the text of the corresponding page.

html.brow.sh
service, you can test the Browsh results – in this case the Linux Magazine homepage.Alternatively, you can connect to the brow.sh
server. Registration is not required. After a few seconds, Browsh starts and is ready for testing.
However, the service only runs for five minutes and records all the actions you perform. It only serves to test the software without obligation. Additionally, some JavaScript does not run correctly, and the computer prevents logging on to services on the network.
Firefox
Browsh uses a little trick when it displays websites: It starts Firefox in the background in headless mode without a user interface and then installs its own extension that instructs Firefox to retrieve and assemble the web page.
Browsh injects some scripts and CSS into the page. The CSS in particular is intended to ensure that the page is aligned with the terminal's grid. Finally, the software converts the result so that it can be displayed as plain text.
Accordingly, Browsh requires Firefox as of version 57 and a terminal that offers a true color (24-bit) display as the basis. In case of doubt, the browser can also be switched to black-and-white mode.
If your system meets these requirements, go to the Browsh download page and download the package that matches the distribution you are using. If in doubt, use Linux Static. For 64-bit systems, click x64; for 32-bit systems, click 386.
After downloading, rename the file to browsh
; then, assign the appropriate run permissions and call the text browser in the terminal:
chmod +x browsh browsh
If you are working with Docker, you should start the software in a container with a current version of Firefox running:
$ docker pull browsh/browsh $ docker run -it --rm browsh/browsh
Typist
The first launch takes a moment. Wait for Browsh to open its own website, and then press Ctrl+L to change focus to the address bar where you can type in the address of the website you want to visit. Press Enter to confirm. Alternatively, you can pass in the URL of the website directly when calling Browsh at the command line:
$ browsh --startup-url https://admin-magazine.com
If you want to exit automatically after a specified number of seconds, use the --time-limit
parameter.
The browser operates as usual by clicking on the appropriate menu items and links with the mouse and navigating through the page with the arrow and scroll keys. If you expand or shrink the terminal window, Browsh automatically adjusts the page display. The display is updated in real time, which is why you can view videos and see animated GIFs.
Browsh recognizes the keyboard shortcuts known from conventional web browsers (Table 1). Pressing Alt+M switches to the monochrome display, which removes all graphics (Figure 3). In this case, the software only uses the foreground and background terminal colors and works with terminals that display only two colors.
Tabelle 1: Fast Control
Key |
Function |
---|---|
F1 |
Documentation |
Arrow keys, Page Up, Page Down |
Navigate the page |
Ctrl+Q |
Exit Browsh |
Ctrl+L |
Activate address bar (to enter URL) |
Ctrl+R |
Reload/refresh page |
Ctrl+T |
Open new tab |
Ctrl+W |
Close current tab |
Backslash |
Switch to next tab |
Backspace |
Go back in history |
Alt+M |
Switch to monochrome display |
Alt+U |
Change user agent identification |
Alt+Shift+P |
Create screenshot |

You can force the program into monochrome mode by calling it with browsh --monochrome
. Pressing Alt+U runs the browser as a smartphone version, which requests a page optimized for mobile devices and may be more suitable for displaying as text.
Character Mash
Browsh uses UTF-8 characters in output, so if you're having problems, you should make sure your terminal can handle this kind of character encoding. The font used by the terminal must support all UTF-8 characters – in particular, the half block, a box character Browsh uses to compose images. Some fonts draw this small box a little smaller, which makes the output look streaky.
The terminal should also use a fixed (non-proportional) font, otherwise the layout of a web page will become disjointed. Buckley-Houston recommends a number of fonts [2]. Last but not least, the terminal itself must align the characters correctly and exactly, otherwise confusing layouts will result.
Browser in Browser
When first launched, Browsh creates a config file named ~/.config/browsh/config.toml
. If necessary, you can use a text editor to adjust the settings. Adding startup-url=
points to the URL that the program calls by default.
If you type only one keyword in the address bar, Browsh appends it to the address entered in default_search_engine_base=
. The browser then calls the entire URL. By default, this calls Google search.
If you switch to the view for mobile devices with Alt+U, Browsh pretends to be Firefox running under Android 7.0. You can change the identity with the mobile_user_agent=
setting. You will want to leave all other settings at their default values.
Browsh offers a mode in which the software itself acts as a server:
browsh --http-server-mode
If you then use any other web browser to access localhost:4333, Browsh is available there as a service. If necessary, you can replace localhost with the IP address or the name of the computer on which the browser is running in server mode. Default port 4333 can be changed by editing the port=
variable in the configuration file.
To call up a page (e.g., the ADMIN magazine homepage), append its URL, as for the http.brow.sh
service, with:
localhost:4333/http://admin-magazine.com
In server mode, Browsh does not offer the complete feature set of the command-line variant. Thus, the software does not update the display in real time, and you are not allowed to log on to web pages.
Blocky
Firefox does the bulk of its work in the background, so Browsh can support its extensions, as well, especially the ad blockers. Just start Browsh with
browsh --firefox.with-gui
to open Firefox. Clicking the hamburger menu on the right and switching to Add-ons allows you to install suitable addons in the usual way. Browsh then automatically uses the enabled extensions. Always use the command-line parameter to do this. Browsh uses its own Firefox profile; other previously installed addons from other profiles are ignored by the command-line browser.
Conclusions
Browsh is always there to help if no graphical user interface is available. Simply reducing the volume of data transferred, however, only works if you run your own server. Moreover, the websites displayed by Browsh are not always easy to read. Compared with the classic competitor Lynx, Browsh maintains the layout in a much more natural format.