'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 1:[1]
Have you tried?
google-chrome http://localhost:3000
Solution 2:[2]
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 ? }
Solution 3:[3]
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.)
Solution 4:[4]
As stated beautifully by @Bexultan Myrzatayev, if google chrome is your default browser, simply
open http://localhost:8000
Solution 5:[5]
This is what worked for me:
open -a "Google Chrome" http:localhost:3000
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Diego Torres Milano |
| Solution 2 | |
| Solution 3 | Community |
| Solution 4 | bmc |
| Solution 5 | stevec |
