Super User is a question and answer site for computer enthusiasts and power users. 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 want to download a file from the Linux command line. Basically I'm using ssh and I'm trying to download a file to my file system on my laptop. How can I do that from the command line?

share|improve this question

migrated from Mar 23 '11 at 2:31

This question came from our site for professional and enthusiast programmers.

wget and curl are commonly used for web URLs. For remote files, use scp for individual files and consider rsync for directories.

share|improve this answer
or scp -r for directories – MattBianco Mar 23 '11 at 9:38
IME rsync is better for both files and directories - if available - apart from anything else it can cope with resumes efficiently. – cbz Mar 23 '11 at 9:59
Agreed; scp -r mostly aggravates me when I make the mistake of trying to use it. – geekosaur Mar 23 '11 at 10:01
I am trying to download eclipse (…) in linux using command line. But I get "Connecting to failed: Connection refused"... Any Idea of what the issue is all about? – om39a Sep 7 '12 at 5:34

If the file is publicly available, then:

share|improve this answer
This article explains how to use different options available for wget . Sengar +1 for you ;) – Shekhar Mar 23 '11 at 10:35

I upvoted zengr's answer, but would like to mention (since your question is a bit vague) lynx or links web browsers as well, if you don't remember the full URL to the file to download.

scp with public key authentication is your friend if you copy between your own machines.

share|improve this answer

You must log in to answer this question.