Lynx
lynx
is a text-based web browser that allows users to browse the internet and view web pages from the command line in Unix-like operating systems.
It's a versatile tool for accessing information from websites without requiring a graphical user interface.
While it doesn't render images or complex layouts like modern graphical browsers, it's useful for quick access to text-based content, checking links, and accessing web resources in a terminal environment.
Basic Usage
lynx [options] [URL]
Common Options
-accept_all_cookies
: Automatically accept all cookies.-cookies
: Enable cookie support.-force_html
: Treat non-HTML files as HTML.-nolist
: Disable display of HTML lists.-dump
: Output page content as plain text.-source
: View page source.-bookmark
: Create bookmarks.-auth
: Provide HTTP authentication credentials.-help
or--help
: Display help information.
Examples
Viewing a Web Page:
lynx https://www.example.com
This opens the
example.com
website inlynx
.Viewing Page Source:
lynx -source https://www.example.com
This displays the HTML source code of the
example.com
website.Browsing with Navigation:
- Use arrow keys to navigate.
- Press
Enter
to follow links. - Press
Q
to quitlynx
.
Viewing Plain Text Version:
lynx -dump https://www.example.com
This outputs the text-based content of the
example.com
website.Creating Bookmarks:
lynx -bookmark https://www.example.com
This opens the
example.com
website and allows you to add a bookmark.Accepting All Cookies:
lynx -accept_all_cookies https://www.example.com
This opens the website and automatically accepts all cookies.
Advanced Usage
lynx
supports navigation through forms, submitting data, viewing images with external viewers, and more.lynx.cfg
is the configuration file that controlslynx
behavior. It can be customized to alter settings.
Use Cases
- Quick access to text-based content without a graphical browser.
- Checking website links for validity.
- Reading articles or documentation from the command line.
- Accessing web resources on servers without GUI interfaces.
Limitations
lynx
doesn't render modern web page layouts, CSS styles, or JavaScript functionality.- It's most effective for browsing text-heavy websites.
Conclusion
lynx
is particularly useful for users who prefer the command line or those working on remote servers.
While it lacks the visual sophistication of graphical browsers, it's a lightweight and efficient way to access information from the web.
✅ Resources
- 👉 Bash CheatSheet
- 👉 Deploy Projects using your own cloud provider
- 👉 Get Deployment Support from
experts