Linux command
links2 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Browse in graphics mode
links2 -g [https://example.com]
Browse in text mode
links2 [https://example.com]
Dump rendered page to stdout
links2 -dump [https://example.com]
Dump with specific text width
links2 -dump -width [120] [https://example.com]
Dump page source
links2 -source [https://example.com]
Start in graphics mode with specific resolution
links2 -g -mode [1024x768x24] [https://example.com]
说明
links2 is a web browser with both text and graphics mode support. In graphics mode, it can display images and render pages more visually while still being lightweight. It is an enhanced version of the original links browser. In text mode, it works similarly to lynx or w3m. In graphics mode (-g), it provides a full visual browsing experience using X11, framebuffer, or SVGAlib. The -dump option is useful for scripting, converting web pages to plain text output.
参数
- -g
- Start in graphics mode.
- -t
- Force text mode.
- -driver _driver_
- Select graphics driver (x, svgalib, fb, directfb).
- -mode _WxHxD_
- Graphics mode resolution and color depth (e.g., 1024x768x24).
- -depth _N_
- Color depth in graphics mode.
- -anonymous
- Anonymous browsing mode (disables local file access and bookmarks).
- -dump
- Dump rendered page text to stdout and exit.
- -width _N_
- Text width in characters for -dump mode.
- -source
- Dump raw HTML page source to stdout and exit.
- -version
- Print version and exit.
FAQ
What is the links2 command used for?
links2 is a web browser with both text and graphics mode support. In graphics mode, it can display images and render pages more visually while still being lightweight. It is an enhanced version of the original links browser. In text mode, it works similarly to lynx or w3m. In graphics mode (-g), it provides a full visual browsing experience using X11, framebuffer, or SVGAlib. The -dump option is useful for scripting, converting web pages to plain text output.
How do I run a basic links2 example?
Run `links2 -g [https://example.com]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -g do in links2?
Start in graphics mode.