{"id":37389,"date":"2022-10-16T03:01:25","date_gmt":"2022-10-15T17:01:25","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=37389"},"modified":"2026-06-04T08:06:31","modified_gmt":"2026-06-03T22:06:31","slug":"lynx-linux-command-line-web-surfing-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/lynx-linux-command-line-web-surfing-primer-tutorial\/","title":{"rendered":"Lynx Linux Command Line Web Surfing Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/lynx_commandline_surfing.jpg\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Lynx Linux Command Line Web Surfing Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/lynx_commandline_surfing.jpg\" title=\"Lynx Linux Command Line Web Surfing Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Lynx Linux Command Line Web Surfing Primer Tutorial<\/p><\/div>\n<p>There are a couple of reasons a Linux user may be interested in command line Web Surfing via the <a target=\"_blank\" title='Lynx Linux command line web browser' href='http:\/\/lynx.browser.org' rel=\"noopener\">Lynx<\/a> web browser &#8230;<\/p>\n<ul>\n<li>they only have access to a terminal<\/li>\n<li>they only want a text based web surfing result <font size=1>(remember back to when this was a web surfing option?)<\/font><\/li>\n<\/ul>\n<p> &#8230; as well as the response time would be faster, in all probability.<\/p>\n<p>We wrote a small PHP script for Linux command line use called <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/lynx_commandline_surfing.php_GETME\" title=\"lynx_commandline_surfing.php\" rel=\"noopener\">lynx_commandline_surfing.php<\/a> accessible, in Linux command line, via &#8230;<\/p>\n<p><code><br \/>\nphp <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/lynx_commandline_surfing.php_GETME\" title=\"lynx_commandline_surfing.php\" rel=\"noopener\">lynx_commandline_surfing.php<\/a> [URL]<br \/>\n<\/code><\/p>\n<p> &#8230; only for the purposes of showing you possibilities going forward for your own further thoughts about what might be possible here (<font size=1>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 &#8220;lynx [URL]&#8221; anyway<\/font>).<\/p>\n<p><code><br \/>\n&lt;?php<br \/>\n\/\/ lynx_commandline_surfing.php<br \/>\n\/\/ RJM Programming<br \/>\n\/\/ April, 2018<br \/>\n<br \/>\nif (isset($_GET['url'])) {<br \/>\n   <a target=\"_blank\" href='http:\/\/au1.php.net\/function.passthru' title='PHP passthru command' rel=\"noopener\">passthru<\/a>(\"lynx \" . urldecode($_GET['url']));<br \/>\n} else if (isset($argv[1])) {<br \/>\n   passthru(\"lynx \" . $argv[1]);<br \/>\n}<br \/>\nexit;<br \/>\n?&gt;<br \/>\n<\/code><\/p>\n<p>Thanks to <a target=\"_blank\" title='Great link, thanks' href='http:\/\/www.linuxandubuntu.com\/home\/linux-command-line-browser-to-surf-internet' rel=\"noopener\">this great link<\/a> for the heads up.<\/p>\n<p><b><i>Stop Press &#8230; 03\/06\/2026<\/i><\/b><\/p>\n<p>There can be provisos here, especially if the computer you are installing the <a target=\"_blank\" title='Lynx Linux command line web browser' href='http:\/\/lynx.browser.org' rel=\"noopener\">Lynx<\/a> browser to is a web server too.  Recently we went &#8230;<\/p>\n<p><code><br \/>\ndnf install lynx y<br \/>\n<\/code><\/p>\n<p> &#8230; into our AlmaLinux web server cPanel&#8217;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 &#8230;<\/p>\n<p><code><br \/>\nxdg-open [aFile.svg]<br \/>\n<\/code><\/p>\n<p> &#8230; 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 <a target=\"_blank\" title='Display' href='https:\/\/unix.stackexchange.com\/questions\/193827\/what-is-display-0?__cf_chl_tk=ijdXZpW7QW4SwudKc8uOfriPYw8JBapZngWmyjcxAGQ-1780524319-1.0.1.1-NhyTHBRUgHgP8ayYG9JWkAI4QfJqYrJ2xqueZfVtkVg' rel=\"noopener\">web server arrangements organized<\/a>, by and large, we&#8217;d warn!<\/p>\n<p>Regarding the dnf package manager &#8230;<\/p>\n<p><code><br \/>\ndnf remove lynx<br \/>\n<\/code><\/p>\n<p> &#8230; undoes the potential timebomb, in the cPanel part of our AlmaLinux web server.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d37389' onclick='var dv=document.getElementById(\"d37389\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/linux\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d37389' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are a couple of reasons a Linux user may be interested in command line Web Surfing via the Lynx web browser &#8230; they only have access to a terminal they only want a text based web surfing result (remember &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/lynx-linux-command-line-web-surfing-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[4855,234,341,5526,4843,4942,4575,558,707,2528,2427,932,3076,997,1012,2802,1190,1200,1224,1225,1319,1404,1411,5524,5525],"class_list":["post-37389","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-almalinux","tag-command-line","tag-display","tag-display-device","tag-dnf","tag-dot","tag-graphviz","tag-hello-world","tag-linux","tag-lynx","tag-passthru","tag-php","tag-power-off","tag-programming","tag-python","tag-reboot","tag-ssh","tag-stop-press","tag-surfing-the-net","tag-surfing-the-web","tag-tutorial","tag-web-browser","tag-web-server","tag-xdg","tag-xdg-open"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/37389"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=37389"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/37389\/revisions"}],"predecessor-version":[{"id":73202,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/37389\/revisions\/73202"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=37389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=37389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=37389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}