I’m going to show you some neat tricks to browse internet via Linux terminal. We are going to use w3m which is a free software and open source text based web browser which you can browse internet by using Terminal. w3m supports tables, frames, color and inline images on compatible terminals. The name w3m stands for “WWW wo miru (WWWを見る?)”, which means in Japanese for “to see the WWW” where W3 is a numeronym of WWW.
To install w3m on Ubuntu, and Debian based Linux distros
# apt-get update; apt-get install w3m w3m-img menu w3m-el migemo libgc1c2 libgif4 libid3tag0 libimlib2
To install w3m on Fedora, Centos and RedHat based Linux distros
# yum install w3m w3m-img w3m-el
You can use w3m with your regular distro’s terminal, but I prefer xterm since you change change font and background color easily. Xterm is a minimalistic terminal emulator for the X Windows System yet has some great feathers that aren’t in gnome-terminal
To install xterm on Ubuntu, and Debian based Linux distros
# apt-get update; apt-get install xterm
Let’s do some web surfing in the terminal, to use w3m, simple type in the terminal w3m + domain name, for example
$ w3m www.google.com
As you can see here this is the original xfce terminal, when you use w3m, it’s hard to read with the black background
That is where xterm comes to shine, to start xterm with with white background and black font color
$ xterm -bg white -fg black
In new xterm terminal, let’s surf google
$ w3m www.google.com
you should see (because I have a small windows, if you have bigger windows screen w3m will display full google’s images
full screen w3m with xterm
So how to navigate with w3m?
“Tab” key on your keyboard will move the cursor through the hyper-links (links)
“Shift+Tab” to move cursor to previous link.
“Shift+u” to open a new website, enter the URL address (domain name) and press Enter. w3m will open up in a new tab.
“s” to view different tabs and select the tab you want, press enter to Select the particular tab.
“Shift+d” to delete a tab by pressing .
“Ctrl+h” to view history
“Shift+L” to show all links present on a web-page. Click on any link by holding “Ctrl” will open the link in Default browser like firefox.
“O” to open Option Setting Panel in which you can change settings like Display Settings, Color Settings, Network Settings, Proxy Settings and many more.
When you right click on any image, there are a list what you can do with the image (view, save, copy, go link…). Double click an image to open large size. For example, if you want to save the image press “Shift+i” or click on “Save Image”. you will be asked to give a path to save the image on your system, you change change the path then press Enter.
To save or convert html to a text file (txt), you can use this command