9

This question already has an answer here:

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?

marked as duplicate by Radu Rădeanu, waltinator, user224082, souravc, Warren Hill May 23 '14 at 7:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • links2 https://jadi.gitbooks.io/lpic1/content/ – EsmaeelE Dec 15 '18 at 21:48
8

Use the command

firefox http://www.youtube.com

This should do it. 8 )

  • that did it!! just had to restart firefox. Thx :D – TipRex Feb 20 '14 at 17:50
9

also look at xdg-open which uses the default program for opening the link

some documentation from Ubuntu:

xdg-open - opens a file or URL in the user’s preferred application

But works the same on Ubuntu

4

If you only need to open it in the background use:

wget http://askubuntu.com

To download a page (optionally mirror sub pages):

wget --mirror -p --convert-links -P ~/Desktop/ http://askubuntu.com/users/182026/kamil

If you want to open it and see it

and you use firefox:

firefox http://askubuntu.com

or you use google chrome

google-chrome http://askubuntu.com
  • oh that's a nice trick. thx a lot :D – TipRex Feb 20 '14 at 17:52
  • I just tried it, but it doesn't work... – TipRex Feb 20 '14 at 17:58
  • @ubuntu.stuff which one doesn't work for you? – kamil Feb 20 '14 at 18:01
  • well the very top one. wget does not do anything... – TipRex Feb 20 '14 at 18:05
  • Indeed, it does, but you're not seeing what happened. do you want to save the page? – kamil Feb 20 '14 at 18:13
3

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-cur

I don't think you need any special repositories,

lynx http://askubuntu.com

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 http://askubuntu.com | more

This will send the output to stdout, and give you the server-response info

Not the answer you're looking for? Browse other questions tagged or ask your own question.