How to Search the Web from Your Terminal with S

S Search Featured

When you’re performing some tasks in the terminal and want to search for some information on a specific site, you have to leave the terminal and run your browser to do the search. S proves there’s a better way to do it.

S is not the only tool to allow you to search the Web from the terminal, but it supports a dozen search engines out of the box. Also known as S-Search, when you carry out a search, the results will appear in your default browser and not directly in your terminal. Let’s see how to search for anything at Google, Amazon, DebianPKG, IMDB, and many others, with a simple command from your terminal.

Installation

The easiest way to install S-search is by using snap. To do it this way, fire up your favorite terminal and type:

sudo snap install s-search
S Search Sudo Snap Install

If you prefer the visual way of doing things, you can install it through your distribution’s Software Center/App Store. You can locate the application there by using its name: “S-search.”

S Search Install From Software Center

If S-search isn’t available in your distribution’s repositories, you can find instructions at its GitHub page to install it from source.

Searching from the Terminal

To search for anything from your terminal on Google Search, you only have to type its name, followed by your query.

For example, to search for our site, Make Tech Easier, we issued the command:

s-search make tech easier

Almost immediately after, our default browser – in our case, Firefox – popped up, showing the results of that search request. It was just as if we had manually visited the Google Search page and typed our query there ourselves.

S Search Default Google Search

Alternative Search Providers

S-Search proves ultra-useful because it supports many other search engines as well. To see a list of all of the sites where you can look for something with S-search, type:

s-search -l
S Search List Providers

To target your query at one of them, you can use their name/keyword like:

s-search -p amazon soldering iron

In the query above, we used S-search to seek a soldering iron at Amazon’s web store.

S Search Use Search Provider

By swapping the provider and the query term, we could, for example, search for a particular song at Spotify. To search for an image at 500px, a game at Steam, and so on.

S Search Find Game At Steam

Behind the Scenes

S-search doesn’t use any advanced algorithms or complex code to pull this off. In fact, S-search is just a collection of search URLs, to which it adds our search queries.

You can check out each of them for any of your searches by using the -o switch. With this switch, instead of opening your default browser to display the results of your query, S-search will reveal the search URL in your terminal.

S Search Display Output

It’s worth noting that we used the same trick in the past to add similar search functionality not only to Peppermint Linux but also to the popular clipboard manager Clipman.

Although the approach was precisely the same, S-search comes with dozens of such URLs for many popular sites baked in and is accessible from the terminal. This combination renders it quite useful since it allows you to search for anything on a whim.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox