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.
Go to Desktop > Applications. Type Terminal in the search bar and click on the first result. Or you can skip the lengthy process and open a new Terminal session by pressing Ctrl + Alt + T on your keyboard. This will load up Google Chrome with the default homepage.
Working on the Terminal allows you to access the browser using a single command. To open Google Chrome with the help of the command line, follow the steps given below: Go to Desktop > Applications. Type Terminal in the search bar and click on the first result.
If you want to use an alias to call Chrome from terminal then you need to edit the bash profile and add an alias on ~/.bash_profile or ~/.zshrc file.The steps are below : Edit ~/.bash_profile or ~/.zshrc file and add the following line alias chrome="open -a 'Google Chrome'"
First, open the Command Prompt by typing “command” in the Windows 10 search bar and then selecting “Command Prompt” from the search results. In Command Prompt, run the following command: start chrome. Chrome will now open. You can also do the same thing from the “Run” window. Open Run by typing “Run” in the Windows 10 search bar and selecting ...
Edit ~/.bash_profile or ~/.zshrc file and add the following line alias chrome="open -a 'Google Chrome'" Save and close the file. Type chrome filename for opening a local file.
Have you tried?
google-chrome http://localhost:3000
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 😉 }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With