LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

google

Search Google from the command line (surfraw elvi)

TLDR

Search Google and open the results page in the default browser
$ google "[search query]"
copy
Feel lucky: jump straight to the first result
$ google -lucky "[search query]"
copy
Search images
$ google -images "[search query]"
copy
Search news
$ google -news "[search query]"
copy
Limit to a number of results
$ google -results=[25] "[search query]"
copy
Search a country-specific edition of Google
$ google -country=[uk] "[search query]"
copy

SYNOPSIS

google [options] words...

DESCRIPTION

google is one of the "elvi" (search engine profiles) that ship with surfraw. Running it builds the appropriate Google search URL from its arguments and opens it in $BROWSER, so no query is made without a browser being launched.With no query words, it opens the relevant Google front page (web, images, news, etc.) instead of a results page. It can also be invoked as sr google [options] words if the standalone symlink isn't installed.

PARAMETERS

-l, -lucky

"I'm Feeling Lucky": jump directly to the first result.
-i, -images
Search Google Images (shorthand for -search=images).
-v, -videos
Search Google Videos.
-m, -maps
Search Google Maps.
-n, -news
Search Google News.
-G, -groups
Search Google Groups.
-results=NUM
Number of search results to return.
-country=CODE
Regional Google site to query, given as an ISO 3166 alpha-2 country code (default us, i.e. google.com).
-safe=LEVEL
SafeSearch filtering level: default, off, moderate, or strict.

CAVEATS

Requires the surfraw package and a configured $BROWSER. It opens results in a browser rather than printing them to the terminal, unlike googler or ddgr.

HISTORY

google is one of the bundled elvi in surfraw, a Unix command-line interface to a variety of web search engines, originally written by Julian Assange in the late 1990s and later maintained by the surfraw community.

SEE ALSO

googler(1), ddgr(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid