Linux command
lynx 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Browse website
lynx [https://example.com]
Browse local file
lynx [file.html]
Dump page as text
lynx -dump [url]
Accept cookies
lynx -accept_all_cookies [url]
Download file
lynx -source [url] > [file]
Use specific config
lynx -cfg=[config.cfg] [url]
Dump without link list
lynx -dump -nolist [url]
Send a POST request
lynx -post_data [url] < [data_file]
Set a custom user agent
lynx -useragent="[MyAgent/1.0]" [url]
说明
lynx is a text-based web browser. It renders HTML in the terminal without graphics. The tool is useful for scripting, accessibility, and browsing on servers. Supports links and forms.
参数
- -dump
- Output page as text.
- -source
- Output page source.
- -accept_all_cookies
- Accept all cookies.
- -cfg _FILE_
- Configuration file.
- -nolist
- Dump without list of references at end of document.
- -post_data
- Send form data via POST from stdin.
- -useragent _STRING_
- Set custom User-Agent header.
- -auth _USER:PASS_
- HTTP basic authentication credentials.
- -head
- Send a HEAD request and show headers.
- -width _N_
- Screen width for formatting (default 80).
- -traversal
- Crawl links starting from the URL.
- --help
- Display help information.
FAQ
What is the lynx command used for?
lynx is a text-based web browser. It renders HTML in the terminal without graphics. The tool is useful for scripting, accessibility, and browsing on servers. Supports links and forms.
How do I run a basic lynx example?
Run `lynx [https://example.com]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -dump do in lynx?
Output page as text.