LinuxCommandLibrary

ftp

TLDR

Connect to server

$ ftp [ftp.example.com]
copy
Connect with username
$ ftp [username]@[ftp.example.com]
copy
Non-interactive mode
$ ftp -n [ftp.example.com]
copy
Download file
$ ftp> get [remote_file] [local_file]
copy
Upload file
$ ftp> put [local_file] [remote_file]
copy

SYNOPSIS

ftp [options] [host]

DESCRIPTION

ftp is the standard File Transfer Protocol client for transferring files between local and remote systems. It provides an interactive command interface for file operations.
The client supports navigation, file listing, binary/ASCII transfer modes, and batch transfers. Passive mode helps with firewalls. The protocol transmits credentials in cleartext.
ftp remains useful for accessing legacy systems and public FTP archives.

PARAMETERS

HOST

FTP server hostname or IP.
-n
No auto-login.
-i
No interactive prompts for multiple transfers.
-v
Verbose mode.
-p
Passive mode.
get FILE
Download file.
put FILE
Upload file.
mget FILES
Download multiple files.
--help
Display help information.

CAVEATS

Insecure - passwords sent in cleartext. Use SFTP or FTPS for sensitive data. Firewall issues with active mode.

HISTORY

ftp is one of the oldest Internet protocols, standardized in RFC 959 (1985). While largely replaced by secure alternatives, it remains widely deployed for anonymous file archives.

SEE ALSO

sftp(1), lftp(1), curl(1)

Copied to clipboard