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.


    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> 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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap