Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm normally a windows user and I am currently using PuTTY to connect to a headless linux box that is running Fedora 8. I need to download the latest JDK and install it but I have to do it using the command line.

How can I do this?

share|improve this question
up vote 6 down vote accepted

You download files using the command line by using wget:


See the wget man page for options.

share|improve this answer

You can use wget

wget http://www.domain.tld/path/to/file

curl -O http://www.domain.tld/path/to/file
or may be lynx:

lynx  http://www.domain.tld/path/to/file

Please see the man page for options.

share|improve this answer

You can grab a link to the download from you need to progress through Sun's download page until you reach the actual link to the download, e.g

Now in your shell just type 'wget ' followed by the url. once its downloaded, execute 'sh jdk-6u16-linux-i586.bin' and run through the installer.

share|improve this answer
+1 for warning the OP about the long ass url – Trevor Harrison Oct 19 '09 at 16:14

For setting up Java tools on Fedora systems, I highly recommend using, which will give you an RPM of the JDK you can install.

share|improve this answer

This is why it is a good idea to install lynx on headless servers, and learn how to use lynx as well. This provides you with text-mode web browsing through a shell prompt, including the ability to download files. Because lynx is often used as the basis for web browsing for blind people, most websites do make an effort to support it.

Lynx would allow you to go to, browse to the Java download page, select what you want and download it.

Alternatively, you could download what you need onto your Windows workstation, then use pscp.exe (the scp that comes with Putty) to copy it through the ssh link to the server. That might be the easiest way to handle your particular situation today. If you want a graphical SCP client, then have a look at WinSCP.

share|improve this answer

Have you tried using the CLI package manager? For Fedora this is yum used as such:

yum search *pattern*

yum install *program*

share|improve this answer
Unfortunately, the repos are dead and gone for Fedora 8. On a more recent flavor of Fedora, the correct solution is to install openjdk since it's a TCK-certified JDK implementation. – Ophidian Oct 19 '09 at 16:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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