Lynx Linux Command Line Web Surfing Primer Tutorial

Lynx Linux Command Line Web Surfing Primer Tutorial

Lynx Linux Command Line Web Surfing Primer Tutorial

There are a couple of reasons a Linux user may be interested in command line Web Surfing via the Lynx web browser …

  • they only have access to a terminal
  • they only want a text based web surfing result (remember back to when this was a web surfing option?)

… as well as the response time would be faster, in all probability.

We wrote a small PHP script for Linux command line use called lynx_commandline_surfing.php accessible, in Linux command line, via …


php lynx_commandline_surfing.php [URL]

… only for the purposes of showing you possibilities going forward for your own further thoughts about what might be possible here (the doh moment being, of course, that you are already there at the command line (perhaps via ssh access to the web server) to type “lynx [URL]” anyway).


<?php
// lynx_commandline_surfing.php
// RJM Programming
// April, 2018

if (isset($_GET['url'])) {
passthru("lynx " . urldecode($_GET['url']));
} else if (isset($argv[1])) {
passthru("lynx " . $argv[1]);
}
exit;
?>

Thanks to this great link for the heads up.

Stop Press … 03/06/2026

There can be provisos here, especially if the computer you are installing the Lynx browser to is a web server too. Recently we went …


dnf install lynx y

… into our AlmaLinux web server cPanel’s command line to try to debug a PHP hosts Python module GraphViz issue, and got the web server into a situation where us going …


xdg-open [aFile.svg]

… to delve deeper caused a rogue application to be unstoppable, and bring down the web server, cPanel and elsewhere, for some time. Public web servers have their web server arrangements organized, by and large, we’d warn!

Regarding the dnf package manager …


dnf remove lynx

… undoes the potential timebomb, in the cPanel part of our AlmaLinux web server.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *