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: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

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