How to FTP using Mac Terminal

FTP (File Transfer Protocol) is pre-installed on macOS 10.12 or below, but if you have macOS High Sierra or higher, you will need to get it installed.

Install FTP Client on Mac using Homebrew

brew install lftp

Let's take a look at how to initiate the FTP command using Mac Terminal.

  1. Open the Mac Terminal (can use any shell, zsh or bash)
  2. Now let's connect to an FTP Server.
    lftp ftp://ftp.code2care.org

    lftp ftp.code2care.org:~>

    You can now login,

    login ftp-username ftp-password
  3. Let's try to do a ls command to see what all we got.
    lftp ftp.code2care.org:~> ls
    drwx------ 2 anonymous users          0 Mar 31 17:52 pub
    -rw------- 1 anonymous users        405 Dec 17  2021 readme.txt
  4. Type exit to quit and return to the prompt.
FTP Example on macOS

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!