LinuxAlternative

Linux · Internet

lftp

lftp is a powerful command-line FTP, SFTP, and HTTP client for reliable file transfers on Linux.

Open sourceFree
Be the first to rate
License
GPL-2.0
Latest version
4.9.3

What is lftp?

lftp is a feature-rich file transfer program that supports FTP, SFTP, HTTP, HTTPS, and more. It's been actively developed since the late 1990s and is known for stability and scriptability. Packaged in major distributions like Debian, Fedora, and Ubuntu, it's a mature, well-tested tool used in both interactive and automated environments.

It's ideal for system administrators, developers, and advanced users comfortable with the terminal. If you rely on reliable, resume-capable transfers or need automation via scripts, lftp excels. It's not designed for casual users who prefer drag-and-drop interfaces.

Compared to WinSCP Pro, lftp feels more technical and less visual. There’s no GUI, but it offers finer control over connections, transfers, and retries. Power users appreciate its scripting and background job capabilities, though newcomers may find the learning curve steep.

Best for: Automated or reliable file transfers from the command line.

Key features of lftp

  • Supports FTP, SFTP, HTTP, HTTPS, HFTP, FISH
  • Can resume broken downloads/uploads
  • Background jobs and transfer queuing
  • Tab completion and command history
  • Configurable mirroring for sync tasks
  • Scriptable with batch commands
  • IPv6 support
  • Bandwidth throttling

Pros

  • Highly reliable for unstable connections
  • Scriptable for automation
  • Resumes transfers seamlessly
  • Lightweight and fast
  • Available in all major distros

Cons

  • No graphical interface
  • Steeper learning curve for beginners
  • Limited built-in file browsing compared to WinSCP

Windows programs lftp replaces

How to install lftp on Linux

Ubuntu / Mintsudo apt install lftp
Debiansudo apt install lftp
Fedorasudo dnf install lftp
Arch / Manjarosudo pacman -S lftp
openSUSEsudo zypper install lftp

Tips for Windows users

If you're used to WinSCP, think of lftp as the terminal equivalent for transfers. You won't drag files, but you can script sessions, queue transfers, and resume reliably. Use bookmarks in ~/.lftprc or save commands in scripts. Tab completion helps with paths. For syncing, 'mirror' and 'reverse-mirror' replace GUI sync tools.

lftp: frequently asked questions

How do I resume a download with lftp?

Use the 'get' command with the '-c' flag to continue interrupted downloads. lftp automatically detects partial files and resumes from where they left off.

Can lftp use SFTP?

Yes, connect with 'open sftp://user@host'. It uses OpenSSH under the hood, so your SSH keys and config apply directly.

How do I run lftp commands in a script?

Write commands in a file and run 'lftp -f script.lftp', or use 'lftp -c "open host; get file"' for one-liners.

Does lftp support passive mode?

Yes, passive mode is enabled by default. You can toggle it with 'set ftp:passive-mode true/false' in your config or session.

Updated