Skip to content

Instantly share code, notes, and snippets.

@gasparrobi
Last active June 4, 2024 09:33
Show Gist options
  • Save gasparrobi/d2d5be833e8828ad89013d2df4d657e3 to your computer and use it in GitHub Desktop.
Save gasparrobi/d2d5be833e8828ad89013d2df4d657e3 to your computer and use it in GitHub Desktop.
headless chrome from terminal in osX

1. set an alias for chrome:

alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"

2. To remote control your chrome headless:

chrome --headless --disable-gpu --remote-debugging-port=9222

@Mosallamy
Copy link

Thanks!

@hyunbinseo
Copy link

hyunbinseo commented Jun 4, 2024

The full list of aliases are provided in the Chrome for Developers website.

alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
alias chrome-canary="/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
alias chromium="/Applications/Chromium.app/Contents/MacOS/Chromium"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment