Is There a Way to Open Browser Using Terminal? [Duplicate]
Is There a Way to Open Chrome (Or Other Browser) Using Terminal? Something Like: $ Chrome? 1 3 Answers from: Terminal Command to Open Url's in Default and...
Is there a way to open Chrome (or other browser) using terminal?
Something like: $ chrome ?
3 Answers
From: Terminal command to open URL's in default and non-default browser (which I don't think is a duplicate)
If you want to open Chrome to a specific URL, just run
google-chrome
To open your default browser to a specific URL, run
xdg-open
If you need to run Chrome and close the terminal window afterward, run
google-chrome </dev/null >/dev/null 2>&1 & disown
>/dev/null 2>&1 will prevent messages from the browser to be outputted to the terminal's window; & will put the process into the background and disown will remove the job / process from the job list, preventing a SIGHUP signal to be propagated to it.
To do this with another browser simply replace google-chrome with that other browser's executable name.
sensible-browser seems to be the option you're looking for. This will run the web browser set as default on your system, you can also pass parameters on it in order to run the web browser and open the given website(s).
Must Read
Usage:
In a terminal, drop the next and hit Return
sensible-browser