 In this video, I want to share with you three of my favorite command line search tools, and when I'm talking about search, I'm talking about web search applications. These are command line tools to search the web because sometimes, especially on a server or a system that doesn't have a graphical environment installed, you don't have a desktop environment, all you have is the TTY. Maybe you're doing something like an installation of a Linux distribution, a command line install, for example, of Arch Linux or Gen2 or whatever it happens to be. And you need to actually do a quick web search to solve some problem. How do you do that? Well, there's actually three very popular web search command line tools that are available in pretty much every Linux distribution's repositories. So let's discuss. So let me switch over to my desktop and I'm going to go ahead and launch a terminal. I'm going to zoom way in and I'll clear the screen. The first tool I want to talk about is Googler. And by the name, you can probably tell, Googler, it searches Google. It's essentially a Google search right here at the command line. Googler is free and open source software. It's licensed under the GPL. And because it's free and open source software, it is pretty much in every Linux distribution's main repositories. You'll find it in the standard Debian repos. You'll find it in the Ubuntu repos. You'll find it in Arch. Sure, there's AUR packages for it as well, both standard Arch repos and AUR packages for Googler. And of course, you can always go to the Googler GitHub page and download the source code yourself for it. The most basic way to use Googler after you get it installed is type the word Googler space and then the string that you want to search for. For example, maybe I want to search for distro2. And what's going to happen is it is going to, here in the terminal, give me the search results. It, by default, it gives you the top 10 search results. And you can see it actually gives you those results here at the command line. Now what happens if you actually want to follow one of these links? You can see you get a prompt down here. You got the question mark here for help if you want help information. Or you can just type a number, the number of the search result. For example, maybe I want to type three. So let me hit three. And what's going to happen is it's going to launch a web browser. You guys didn't see that. That was going to be on a different screen. But by default, my web browser is a graphical browser. It's actually the Brave browser. So what you want to do, since if you're doing this at the command line, you probably want to stay at the command line both with the search results. And then when you follow the links, you probably want to use a command line web browser as well. So typically what you want to do is you want to go ahead and export a command line browser as well. So what you want to do is you want to set browser equals. And instead of Brave or Firefox or whatever your default browser typically is, set it to something like links or W3M or any of the other command line web browsers that we have available. There's a dozen of them that are pretty good here on Linux. So I'm going to do browser equals W3M. So export that variable. And then I'm going to do a Googler space. And then we'll search, once again, for the string distro2. And once again, I get the same search results returned. And now when I type three and hit Enter, it's actually going to open that link in W3M since that was the browser I specified. And of course, I could navigate around my website here. And I could click on a link and follow the link. I'm going to hit Q to quit. Y for yes to quit out of W3M. If you want to see some of the flags and options available for Googler, do the question mark. And you can see some of the commands you can enter in the Googler prompt. For example, when I hit Q, that tells Googler to quit or exit. You also have F for jump to the first page, N and P for next and previous. So you can also give it just a index number. And of course, that's what I did earlier by typing three. I was wanting it to open the third search result. I'm going to type Q to quit. Another really good source of information, TLDR is a command line program. It's kind of a cheat sheet program. It's a really short man page. Instead of getting a really lengthy manual to read, TLDR is nice because it just gives you eight or 10 of the most common ways to use a particular program. So if you do a TLDR on Googler, you can see some of the common flags and options. For example, Googler dash J keyword would open the very first search result in the web browser so you don't have to specify an index number. Let's try that. So I'm going to up arrow. Once again, I'm going to export the browser to be W3M because by default, again, on my system, the browser would be brave and I want to stay in the terminal here. But if I do Googler dash J distro tube, now instead of returning the top 10 search results, it's just going to grab the first one and take us directly there inside the W3M browser, which is exactly what happened. It actually took us to YouTube. YouTube does not look good in the W3M browser though. That's why it doesn't load properly. When it looks like the dash N flag, we could specify a certain amount of search results. So if I do dash N5 and let's search for Linux, it should give us five search results for the keyword Linux. Let's hit enter. It actually only gave us three instead of five. That is interesting. Let me cue to quit. I'm going to up arrow. I wonder if it's offset by two for some reason. I wonder if that's a bug. If I did a dash N7, would it actually give me five search results? It wouldn't. So yeah, that's probably a little bit of a bug. I don't know if the Googler team knows about that. If I did dash N3, I'm only going to get one. Let me hit one and make sure it follows the link and it does. It takes us to the page that was that search result. So let me cue to quit out of that. I'm going to clear the screen. And the next command line search tool I want to talk about is DDGR. Now DDGR is interesting because it's essentially just like Googler. As a matter of fact, you can think of it as Duck Duck Gower instead of Googler. But it's essentially a clone of Googler designed to search Duck Duck Go rather than Google because not everybody wants to search Google for whatever reasons, you know, privacy reasons or freedom reasons. I can certainly understand that DDGR essentially though works just like Googler for the most part. I'm a DDGR and I searched for distro tube. Once again, you get 10 search results by default. And if I wanted to follow one of these links, for example, number three, it's going to open that in my default browser, which is the brave browser. You guys again can't see that. But if I switch to a different workspace, you can see it actually does open that just fine. So let me go back to the terminal and type cue to quit. So once again, what you'd want to do is you'd want to make sure if your default browser is a graphical browser, but for some reason you're stuck in a TTY, make sure you export your default browser to be a command line browser. So in this case, I'll do the same search. And this time I'm going to go ahead and open the eighth search result. And this time it opens this inside W3M. So cue Y to exit. And let me cue to get out of that. Let's see if there is a DLTR on Duck Duck Gower. There is not. Is there a man page? There is a few flags and options, but honestly, it's the same flags and options pretty much for Googler. For example, the same flags and options to specify number of results for Googler. It would be the exact same for DDGR. So let's get the top three results for Linux. And it actually does give us the correct number. Three results. Maybe the one I want is Linux.com. So number three, hit enter. And of course, it opens that particular web page, cue and Y to get out of W3M, cue to quit out of DDGR. Like Googler, DDGR should be in pretty much every Linux distribution's repositories. Like Googler, DDGR is also licensed under the GPL license. So let me clear the screen. And the third program I want to talk about is Surferol. Now Surferol is an interesting program. It is quite old. It's been around pretty much as long as I've been using Linux. I think Surferol was originally created by Julian Assange many years ago. But Surferol is, for those of you wondering about licensing, Surferol is not actually licensed under a free and open source license. It is actually not licensed under any license at all. It is actually public domain software. And unlike Googler and DDGR, Surferol actually gives you the ability to search dozens of different search indices. If I actually switch back over to my browser and go to Surferol.org. This is the web page. It's a very old school looking web page that's a blinding white background with black text. But if you go to list of Elvi, the Elvi are the search indices that Surferol can search by default. And you can see it's a rather lengthy list. You can search everything from Google and YouTube and Yahoo and Wikipedia Wiktionary, various dictionaries and translate tools and news sites like CNN and you got Amazon in here. You can search the Arch repositories. You can search the Arch Wiki. You can search the AUR and pretty much anything else you can imagine with Surferol. Now because Surferol can search various different search indices. Instead of just giving it a string, you do have to tell it what search engine to search. For example, tell it to search Google for a particular query and it's going to open that. Again, it's going to open it in a browser and this time it's actually opening in Firefox even though Brave is my browser. I don't know if that's hard coded to open Firefox but luckily I had Firefox installed on my system. But once again, you can always tell the shell what browser you want. So if you could do browser equals once again, I'll default to W3M and then do Surferol Google query and it actually opens the Google search results on Google.com within W3M. So it's a kind of a different kind of layout than Googler and DDGR. But that's probably necessary because again, you do have the ability to search so many things. For example, I wonder how an Amazon search would look inside W3M. I don't know if Amazon looks good in a terminal based browser but it did actually open the page Q to quit Y to get out of that. If you want to get a complete list of the Lvi, right, those search indices that are available within Surferol, you could do a Surferol space dash, a single dash Lvi and it'll give you a list. And one thing you don't actually have to type the full word Surferol. Surferol does come with a built in alias, simply SR for Surferol. Also works for all the commands so I could have done browser equals W3M space SR and then Google and then Ubuntu for example. And I get the search results from Google for Ubuntu inside W3M Q and Y to exit out of W3M. Now one thing to note about Surferol, there's a couple of things I do want to mention. Because you have so many indices that you could search, some of these do not look good in certain browsers. I've already shown you that YouTube, for example, does not look good in the W3M browser. It just doesn't render right. Of course, YouTube is meant to watch videos so I don't know why you would be searching YouTube in a TTY. But if for some reason you were, just know that you may have to try different command line browsers. Maybe links will render YouTube search results better than W3M or maybe try the E-links browser. Again, there's several command line browsers you could actually choose to use. Another thing I want to mention about Surferol is that the Surferol package as it exists in the standard Arch repositories because Surferol is in the standard Arch repositories. But I found that that package was broken. I was getting errors every time I was trying to use Surferol. So the standard build of Surferol doesn't seem to work right in Arch. What you need to do is go grab the Surferol-get package from the AUR. You can do a yay or a paru-capitalS and specify AUR slash Surferol-get is the name of the package. And the AUR build of Surferol works just fine. Of course, that is what I've been demonstrating here on this video. So there you have it. Three very popular ways to search the web right from the terminal, right from the command line. And again, Googler, DDGR, Surferol, they're in pretty much every Linux distributions repositories. They're all free and open source software, or in Surferol's case, it's public domain software. Now, before I go, I need to thank a few special people. I need to thank the producers of this episode, Gabe James Matt, Paul Wess, Armoredragon, Commander Angry George, Lee Methos, Nate Arion, Paul Pease, Archon Fodor, Realiteats Realize, Rip Profit, Roland, Solastri, Tools Devler, Warchintu, and Ubuntu, and Willie. These guys, they're my highest tiered patrons over on Patreon without these guys. This quick look at command line ways to search Google, DuckDuckGo, Amazon. That wouldn't have been possible. The show is also brought to you by each and every one of these lovely ladies and gentlemen. These are all my supporters over on Patreon because, you know, without each and every one of these guys, I wouldn't be able to do what I do. If you like my work and want to see more videos about free and open source software, subscribe to DistroTube over on Patreon. Peace, guys.