17

Whenever I try to open Google Chrome with the URL "localhost:3000" it messes up and simply opens a blank tab with no URL. After some testing I've figures out it is the ":" messing it up. This works:

$ google-chrome www.gmail.com

but this does not work

$ google-chrome localhost:3000

nor this

$ google-chrome "localhost:3000"

How can I open Google Chrome with this URL? I am using Ubuntu, bash script, and the gnome-terminal.

Zack
  • 784
  • 1
  • 8
  • 17

4 Answers4

29

Have you tried?

google-chrome http://localhost:3000
Diego Torres Milano
  • 57,580
  • 7
  • 101
  • 124
9

Got the following message:

zsh(or bash): command not found: google-chrome (or chromium-browser)

Solved my problem:

open http://localhost:3000

{ I use Google Chrome as a default browser }

  • 2
    I really like this answer, since it is browser-agnostic. It opens the URL in the default browser, whatever it is. – Chris Mejka Dec 07 '18 at 11:19
  • `chromium-browser`, `chrome`, `google-chrome`, `open`, and `chromium` are all `command not found` for me, using bash in linux – Justin Feb 07 '21 at 00:09
2

I don't seem to have this problem.

chromium "http://localhost:8889"
chromium "http://127.0.0.1:8889"

One quick suggestion would be to check to see if 127.0.0.1:3000 works (newer versions of ubuntu seem to have an issue resolving "localhost" instead of the numbered IP address.)

Community
  • 1
  • 1
Damian Nikodem
  • 1,274
  • 10
  • 26
0

As stated beautifully by @Bexultan Myrzatayev, if google chrome is your default browser, simply

open http://localhost:8000
bmc
  • 671
  • 11
  • 15