Can I Open a Certain Website with a Command Line? [Duplicate]

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?

1

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

0

Use the command

firefox

This should do it. 8 )

1

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

I 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  | more

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

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest