Apple - Missing ftp command line tool on macOS

macOS does not come with an FTP command line tool. You can connect read-only (just for downloading things) to FTP servers using Finder. Open Finder and choose Go → Connect to Server (⌘K or ) and enter ftp://ftp.gnu.org/.

When prompted for a username and password, choose Guest if the server does not require authentication, which is the case with ftp.gnu.org.

If you do need ftp on the command line, you can install ftp using Homebrew:

brew install inetutils

Edit:

I didn't see the last part of @grg's answer: brew install inetutils is even better. It installs those old school GNU network utilities, acessible from the command line:

- dnsdomainname
- ftp
- rcp
- rexec
- rlogin
- rsh
- telnet

If you want to have the "old-school" feeling of a ftp session into the Terminal, you can install ncftp with Homebrew:

~/ $ brew install ncftp
==> Downloading https://homebrew.bintray.com/bottles/ncftp-3.2.6.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ncftp-3.2.6.mojave.bottle.tar.gz
  /usr/local/Cellar/ncftp/3.2.6: 16 files, 1.3MB

~/ $ ncftp ftp.gnu.org
NcFTP 3.2.6 (Dec 04, 2016) by Mike Gleason (http://www.NcFTP.com/contact/).

Copyright (c) 1992-2016 by Mike Gleason.
All rights reserved.

Connecting to 209.51.188.20...                                                                                           
GNU FTP server ready.
Logging in...                                                                                                            
NOTICE (Updated October 13 2017):

Because of security concerns with plaintext protocols, we still
intend to disable the FTP protocol for downloads on this server
(downloads would still be available over HTTP and HTTPS), but we
will not be doing it on November 1, 2017, as previously announced
here. We will be sharing our reasons and offering a chance to
comment on this issue soon; watch this space for details.

If you maintain scripts used to access ftp.gnu.org over FTP,
we strongly encourage you to change them to use HTTPS instead.

---

Due to U.S. Export Regulations, all cryptographic software on this
site is subject to the following legal notice:

    This site includes publicly available encryption source code
    which, together with object code resulting from the compiling of
    publicly available source code, may be exported from the United
    States under License Exception "TSU" pursuant to 15 C.F.R. Section
    740.13(e).

This legal notice applies to cryptographic software only. Please see
the Bureau of Industry and Security (www.bxa.doc.gov) for more
information about current U.S. regulations.
Login successful.
Logged in to ftp.gnu.org.

ncftp / > cd /gnu/diction
Directory successfully changed.
ncftp /gnu/diction > ls
diction-0.7.tar.gz            diction-1.02.tar.gz           diction-1.11.tar.gz           diction-1.11.tar.gz.sig

ncftp /gnu/diction > get diction-1.11.tar.gz
diction-1.11.tar.gz:                                   137.76 kB  118.63 kB/s  
ncftp /gnu/diction > bye

I came here, because I too, am following the classic (and excellent) book "The Linux Command Line", and just reached the chapter about compilation.

It might be old, deprecated and unsecure, but it still feels geek and great.


You can open ftp://ftp.gnu.org/ in Firefox and Chrome without going to the Finder, which is what Safari does.

If you have a complete URL to download, use curl, as in

curl -L -R -O ftp://ftp.gnu.org/gnu/bc/bc-1.07.1.tar.gz

Do man curl or curl --help for more information.

Tags:

Ftp

Bash