Common Web browsers in the command line

Source: Internet
Author: User
Tags line web

Although the command line Web browser does not support multimedia elements such as picture audio and video, Web functionality is limited, but because it is not dependent on the GUI can be used more widely, but also has the advantages of fast loading speed and low consumption of resources. Use the command line browser at the terminal to view text-based technical documents to avoid being surrounded by ads and to influence the reading experience. In combination with the command parameters of the browser itself and the shell script, it is possible to convert the HTML document to a plain text file save, automatically obtain the specified network information and generate the document.

Here's a quick introduction to the three most common command-line browsers.

Lynx

The Lynx browser, which began in 1992, is arguably the oldest web browser. Originally designed for the Unix-like platform, after a gradual cross-platform support for DOS and Windows. The first contact with Lynx is in Slackware, a lot of Linux textbooks are often referred to it, and then unknowingly become their common CLI browser.

Official website:http://lynx.browser.org

Command syntax

Lynx [Options] [URL]

  

Raise two chestnuts.

Open the blog directly home

Lynx https://www.cnblogs.com

Save the contents of an HTML document to txt text (this method in addition to convert TXT can also solve some Web site login to make replication and completely prohibit replication problems, do not change the browser settings and clean source is very convenient. )

Lynx-dump [URL] > Yourfile.txt

  

The most common operations

Operation Keys or commands
Get help --help
Move to the next link in the page (display with high brightness) Down ARROW key
Move to the previous link on the page (display with high brightness) Up ARROW key
Jump to the address that the link points to Return and RIGHT ARROW keys
Back to previous page Left ARROW key
Page Down +, Page-down, Space, ctrl+f
Page UP -, page-up, B, ctrl+b
Move to the top of the current page CTRL + A
Move to the bottom of the current page Ctrl+e
Turn down two lines CTRL + N
Flip two lines up Ctrl+p
Turn down half a page )
Turn up half a page (
Download Current link D
Exit Q

More Parameters View man manual and use--help

Links

The Links browser uses a similar approach to lynx, with many branches (such as ELinks), and the use of the same method. The relatively simple lynx has more menus and dialog boxes to experience browsers that are closer to the mainstream of the GUI. The first time I touched it when I was tossing Gentoo Linux, it was often used in CentOS. Unfortunately, after a period of time, it was found that support for Chinese web pages was worse on many platforms.

Home:http://links.twibright.com

Command syntax

Links [Options] [URL]

Basic operations refer to the Lynx section.

w3m

w3m Display Chinese web page effect is better than the previous two, it supports tables, frames, SSL lines, colors, usually as far as possible to show the original layout of the page. However, due to the combination of vim and Emacs shortcut key style, it takes some time to learn and adapt to the operation.

w3m List of shortcut keys

Page actions

Operation Shortcut keys
Page Down Spc,c-v
Page UP B,esc V
Focus Right L,c-f
Focus left H,c-b
Focus Down J,c-n
Focus Upward K,c-p
Scroll down one line J
Scroll up one line K
To the beginning ^,c-a
To end of line $,c-e
To the next word W
To the previous word W
Move Right One screen >
Move left one screen <
The screen moves right one column .
The screen moves left one column ,
To the first line g,m-<
To the last line G,m->
to the specified line ESC g
Center Current row Z
Center Current column Z
Go to Next hyperlink TAB
To the last hyperlink C-u,esc TAB
To the first hyperlink [
To the last hyperlink ]

Hyperlink action

Operation Shortcut keys
Open a hyperlink Enter
Save Link as A, ESC Enter
View Link URL U
View image URL I
View pictures I
Save Picture As ESC I
Tag string as anchor point :
View the URL of the current page C
Show Current Page Properties =
View the current line number C-g
View historical records H
Submit Form F
Open the current page with an external browser M
Open a link with an external browser ESC M
Tag ID string as anchor point Esc

File/Stream Operations

Operation Shortcut keys
Open URL U
Open File V
Execute external commands and import @
Execute external commands and browse #

Cache operations

Operation Shortcut keys
Return B
View Source code V
Select Cache S
Edit the cache code E
Repaint the screen C-l
Refresh R
Save page as S
Save Source as ESC s
Edit Picture ESC E

Cache selection Mode

Operation Shortcut keys
Previous cache K, C-p
Next cache J, C-n
Delete Current Cache D
Go to the selected cache Enter

Bookmark actions

Operation Shortcut keys
Open Bookmark ESC b
Add current page to bookmark ESC A

Search

Operation Shortcut keys
Search forward /,c-s
Search backwards ?, C-r
Next N
Last N
Turn cycle search on/off C-w

Mark

Operation Shortcut keys
Set/Cancel Mark C-spc
Go to previous marker ESC P
Go to next marker ESC N
Using Regular expression Tokens "

Miscellaneous

Operation Shortcut keys
Execute external command !
Help H
Setting options O
Display of accepted cookies C-k
Stop it C-c
Suspend (Exit) C-z
Exit (Confirmation required) Q
Exit without confirmation Q

Row edit mode

Operation Shortcut keys
Cursor backwards C-f
Cursor forward C-b
Delete previous character H
Delete current character C-d
Delete all content after cursor C-k
Delete all content before cursor C-u
Cursor to beginning of line C-a
Cursor to end of line C-e
Get the previous word from the history record C-p
Get the last word in the history record C-n
Auto-Complete file name Tab,spc
Are you sure Enter

Common Web browsers in the command line

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.