Cover image for How to search Google from the terminal

How to search Google from the terminal

richardmaccaw profile image Richard MacCaw ・1 min read

I'm sure we all do a lot of Googling in our day to day coding. Hopefully this alias will save you some time and improve your productivity. Feel free to share your most used aliases below!

Add to $HOME/.bashrc or $HOME/.zshrc depending on which shell you use.

function google {
  open -a 'Google Chrome' https://www.google.com/search\?q\="$1"

Restart your terminal. πŸ’΅πŸ‘

Some examples:

google "center div flexbox"
google "padding vs margin"
google "how to css"
google dev.to


markdown guide