Search code examples
bashgoogle-chromegnome-terminal

How can I open Google Chrome from the terminal with the URL "localhost:3000"?


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.


Solution

  • Have you tried?

    google-chrome http://localhost:3000