Missing ftp command line tool on macOS Use ftp to obtain source code.

I am following a linux command line book to learning compiling.



[me@linuxbox src]$ ftp ftp.gnu.org 
Connected to ftp.gnu.org. 
220 GNU FTP server ready.


I tried and it reported an error

$ ftp ftp://ftp.gnu.org/
-bash: ftp: command not found




$ ftp 
-bash: ftp: command not found


How to solve the problem?
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