Novell Home

Basics: How to download files on a Linux machine

Novell Cool Solutions: Tip
By Stomfi

Digg This - Slashdot This

Posted: 1 Apr 2005
 

Question: I don't know if you've received this question before, but here goes. How do you download on a Linux machine? You gave a link in a previous question to download the Berkeley Vi Editor. I went to the site and clicked on download. A window appeared and asked: "What should Firefox do with this file?" Open with gunzip(default) was already chosen, so I tried that. A blank screen appeared with "Transferring data from ftp.sleepycat.com..." in the lower left part of the screen. I got out of there after a half hour of nothing happening and tried the other option, "save to disk". The same thing happened with that.

In MS Windows, when I choose Open, the download automatically installs. When I choose "save to disk" it asks where I want to save it. How do I find out where Linux saves downloads, how do I get there and once I get there, how do I install it? I know this is more than one question, but I'm still pretty new at Linux. Thank you.

Answer: For SUSE

Vi is included in every Linux distribution, so that you should never have to download it. Since there are hundreds of free programs already on your system, it is best to check if a program is on your system before you try to download it. You can do this by opening a console terminal and typing:

$ whereis vi

The whereis command will tell you if it is one of the PATH folders. The PATH is where Linux looks for common commands and programs. This doesn't always work because some programs, especially suites, are put into the /opt folder, where optional programs go. So another command used to find programs and files is called locate. Give the command:

$ locate vi

This will find every file with the letters vi in it. If it is exactly the same name as the one you are looking for or if it the same with a ".sh" extension, it will probably be the one. You can test these by making it execute from its folder. For example:

$ /opt/mozilla/bin/mozilla.sh

The site you visited was an FTP site and even in Windows, you would use an FTP clients to do a download. You should go to an HTTP HTML download site if you are using a browser.

Here is a copy of the Vim.org download page. You can see that some of them start with ftp and others with http. If you use a browser to download (Slower but easier) go to the http sites.

-- VIM Distribution Sites --

Vim can be found at:
  ftp://ftp.home.vim.org/pub/vim/                     Holland, Amsterdam
  http://ftp.vim.org/pub/vim/                         Holland, Amsterdam

Server status and planned downtime:
  http://www.nluug.nl/ftpserver/status.html

Mirrors (working):
  ftp://ftp.vim.org/pub/vim/                          Holland, Amsterdam
  ftp://ftp.us.vim.org/pub/vim/                       USA, California
  ftp://ftp2.us.vim.org/pub/vim/                      USA, Hoboken, NJ
  ftp://ftp3.us.vim.org/pub/mirrors/ftp.vim.org/vim/  USA, Michigan?
  ftp://ftp4.us.vim.org/pub/vim/                      USA, Chicago
x ftp://ftp9.us.vim.org/pub/editors/vim/              USA, New York
  ftp://ftp.parodius.com/pub/vim/                     USA, Fremont
  ftp://ftp.ca.vim.org/pub/vim/                       Canada, Burlington
  ftp://ftp.nl.vim.org/pub/vim/                       Holland, Amsterdam
  ftp://ftp.de.vim.org/                               Germany, Berlin
  ftp://ftp3.de.vim.org/pub/vim/                      Germany, Oldenburg
  ftp://ftp.uk.vim.org/pub/vim/                       England, London
  ftp://ftp2.uk.vim.org/pub/vim/                      England, Kent
  ftp://ftp.ie.vim.org/pub/vim/                       Ireland, Dublin
  ftp://ftp.fr.vim.org/pub/vim/                       France, Gif sur Yvette
  ftp://ftp2.fr.vim.org/pub/Mirrors/vim/              France, Paris
  ftp://ftp.it.vim.org/pub/vim/                       Italy, Pistoia
  ftp://ftp.at.vim.org/pub/vim/                       Austria, Vienna
  ftp://ftp.dk.vim.org/pub/vim/                       Denmark, Copenhagen
  ftp://ftp.se.vim.org/pub/mirrors/vim/               Sweden, Borlange
  ftp://ftp.es.vim.org/pub/vim/                       Spain
  ftp://ftp.is.vim.org/pub/vim/                       Iceland
  ftp://ftp.il.vim.org/pub/vim/                       Israel, Haifa
+ ftp://ftp.pl.vim.org/pub/vim/                       Poland, Warsaw
  ftp://ftp.ro.vim.org/pub/vim/                       Romania, Iasi
  ftp://ftp.sk.vim.org/pub/vim                        Slovakia
  ftp://ftp.sg.vim.org/pub/vim/                       Singapore
  ftp://ftp.tw.vim.org/pub/vim/                       Taiwan, Kaohsiung
  ftp://ftp2.tw.vim.org/pub/vim/                      Taiwan, Taichung
  ftp://ftp.jp.vim.org/pub/vim/                       Japan, Tokyo
  ftp://ftp.kr.vim.org/pub/vim/                       Korea, Seoul

HTTP mirror of ftp site:
  http://shattered.teched.net/vim-ftp-mirror/         Columbus, Ohio, USA
  http://ftp.tw.vim.org/pub/vim/                      Taiwan, Kaohsiung
  http://ftp2.tw.vim.org/                             Taiwan, Taichung
= http://ftp.at.vim.org/pub/vim/                      Austria, Vienna
  http://ftp.es.vim.org/pub/vim/                      Spain
  http://ftp.il.vim.org/pub/vim/                      Israel, Haifa
  http://ftp.ru.vim.org/pub/vim/                      Moscow, Russian Fed.
  http://ftp2.sk.vim.org/pub/vim/                     Slovakia, Bratislava
  http://ftp2.uk.vim.org/pub/vim/                     England, Kent

SUSE KDE has a nice ftp client if you want to try it out.

In Linux, because of built-in security, new programs are saved to disk, and then installed by the super user/ root user. Your Linux firewall will probably complain if you try to do a direct install over the net, or it may not even allow you to, depending on how securely you've got it set.

Make sure that you never go onto the Internet as the root user. (It is best never to login as the root user).

Always, as a newbie, download new programs in your package manager format and for your particular distribution.

i.e. for SUSE 9.2 in rpm format. e.g. progname-2.2.1.rpm

The www.vim.org site probably doesn't have rpms for your distro as it is the programming site. Either get them from your distro supplier's site or go to rpm.pbone.net and look for your programs there.

Create a sub folder in your home folder for saving them. Mine is called "/home/stomfi/webstuff" You can tell all your downloads to go there by opening "Edit -- Preferences" in the FireFox menu bar.

This is the preferences window:

You can see that I've chosen the folder I created to save my downloads in.

I downloaded the ftp by clicking on it in the browser window and it downloaded right into my folder. Like you, I'm using Firefox version 1.0 as supplied by SUSE 9.2.

One thing that may make a difference is that I allow ftp files to come through my firewall.

To install the downloaded rpm file, open the file manager, double click on the file.

Here it is with the vim file:

Clicking the file brings up this window:

Click the Install button. This will open the super user password window:

The super user's password opens the rpm installer which will go through the install sequence and then close. Here is the install, part way through the process:

This is the same method as that is used for installing from a CD-ROM or other removable media on SUSE.

This Newbie answer has covered:

How to check whether a program is on your system.
How to find packages suitable for your distribution.
How to set up a download folder.
How to download a package using FireFox 1.0.
How to install the package.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell