FactorPad
Faster Learning Tutorials

Linux ftp command summary with examples

ftp allows you to automate the transfer of files.
  1. Purpose - Learn what ftp is for and how to find help.
  2. Options - Review a few common options and arguments.
  3. Examples - Walk through code examples with ftp.
  4. A tip - Finish off with one more insight.
Paul Alan Davis, CFA, November 12, 2016
Updated: August 6, 2018
In this tutorial, 84 of 100, below find a 3-4 minute introductory video, a text-based tutorial and all of the code examples from the video.

Outline Back Next

~/ home  / tech  / linux essentials  / ftp command


The Linux ftp command

Beginner

Learn to automate the transfer of files at the Linux command line.

Video Tutorial

Linux ftp command summary with examples (3:29)

Videos can also be accessed from the YouTube Playlist.

Video Script

The Command and Why You Need It

Our eighty-fourth word, or command to memorize is ftp from our category Communication.

ftp allows you to automate the transfer of files.

Recall from the last two videos, we covered data transfer from the command line, and a new concept called Protocols and now we'll log in to a remote system using the ftp Protocol.

Before we start, it helps to think of commands as mini programs and most follow this structure: command -option(s) argument(s).

The ftp command has 9 options, and the argument is the hostname, entered like you would an http:// address in your browser, but here use ftp:// and the hostname and optionally a port number.

Unlike most commands, help is not available with double-dash --help. The -v option enters verbose mode showing statistics.

So why is ftp an important command? Well, most people access data sets through their browser manually but using ftp Protocol is a good way to automate transfers. And now you know how to do that.

Demonstration

Okay, the best way to embed this in your memory is by typing in your own terminal window.

Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.

Here we go. We'll log in to a public US Library of Congress ftp server. The ftp Protocol predates http I mentioned earlier, which you use in your web browser. And some servers let you log in anonymously with no password, and that's what we're doing here.

$ ftp ftp.loc.gov Connected to rs7.loc.gov. 220 rs7 FTP server (Library of Congress) ready. Name (ftp.loc.gov: : anonymous 331 Guest login ok, send your complete e-mail address as password. Password: _ 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. ftp> _

And here, if this was a private system you could enter one of about 75 different commands, but many won't work because of security concerns, so I'll just show you a cd to the pub directory, to change directories.

ftp> cd pub 250-Please read the file README 250- it was last modified on Wed Dec 7 10:43:49 1994 - 8006 days ago 250 CWD command successful. ftp>

And last, before we end up on a government watch list, let's type bye to close the ftp connection.

ftp> bye 221 Goodbye.

A Final Tip

Okay now you know how to use ftp. And you know the syntax for commands, options and arguments.

One last tip about the ftp command. So over time the ftp has been replaced by more secure options: lftp or sftp. Here, I simply wanted you to see ftp and I'll introduce other tools shortly.

Okay, thanks for visiting today. I hope this was a helpful introduction to the ftp command.


Learn More About The Series

For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:


What's Next?

If you support our effort to bring you free content with non-invasive advertising, please support us by subscribing to our YouTube Channel here. Thank you.

  • For the Outline to all 100 tutorials, click Outline
  • To go back to the traceroute command, hit Back.
  • To learn how Search Engines know so much about the Internet stick around for the next tutorial on wget. Click Next.

Outline Back Next

~/ home  / tech  / linux essentials  / ftp command



 
 
Keywords:
linux ftp command
ftp commands
networking commands
ftp file transfer
ftp protocol
ftp transfer
linux ftp client
ftp command line
ftp client linux
ftp connection
linux ftp tutorial
ftp site
secure ftp
ftp server
secure ftp server
ftp command line
linux transfer files
automated transfer
how to ftp
how to use ftp
man ftp
ftp examples