I am configuring hotkeys for commands and want a way to open websites from the command line.
For example, how would I open YouTube directly in Firefox without first opening the browser and then entering the address for YouTube?
14 Answers
Have a look at xdg-open which uses the default program for opening the link:
xdg-open some documentation from Ubuntu:
xdg-open - opens a file or URL in the user’s preferred application
0Use the command
firefox
This should do it. 8 )
1If you only need to open it in the background use:
wget To download a page (optionally mirror sub pages):
wget --mirror -p --convert-links -P ~/Desktop/ If you want to open it and see it
and you use firefox:
firefox or you use google chrome
google-chrome 9 If you want to use the web page from an xterm/command line then you can install lynx on Ubuntu 12.04 LTS. I have lynx-cur installed.
apt-get install lynx-curI don't think you need any special repositories,
lynx I use it to do screen scrapes
wget can be used as follows if you want to look at what is going by:
wget -O- -S | moreThis will send the output to stdout, and give you the server-response info