You’re probably here because you got a shiny new Mac, possibly with M1 chip and macOS Big Sur, and you realized the ftp and telnet commands are not included by default anymore (note that FTP still works in the GUI, though). This is true for all Macs (both Intel and Apple Silicon based) since macOS Mojave or something around that time. The interesting thing is, tftp is still included though.

Today I will show you how to install the ftp and telnet commands, and the best part is, this will work on Big Sur, both on Intel and Apple Silicon Macs, without emulation!

Downloading and installing MacPorts

We’ll do this by first installing [MacPorts from here].

MacPorts download

Simply click on your version of macOS to download MacPorts. Once downloaded, double click the installer and proceed to installing MacPorts.

Updating MacPorts

Now open a terminal and run:

sudo port selfupdate

This will download the latest MacPorts and its tree, which requires admin rights to do, so it will ask for your password. Note that it won’t show the characters as you type.

sudo port selfupdate
sudo port selfupdate

Installing inetutils

Now we’ll install inetutils through MacPorts, which includes ftp and telnet, among other utilities, with the command:

sudo port install inetutils

It might ask for your password again for installation, then it will ask if you want to proceed with the install. Confirm by entering the letter “Y” and hitting enter.

After the installation is complete, close the terminal and open it again. Now try typing gtelnet or gftp, note that for now the utilities are prefixed with “g” which stands for GNU because those are the GNU inetutils, we’ll fix that in the next step.

Note that to close telnet you’ll have to enter CTRL + C, and to close ftp you’ll have to enter CTRL + D.

Aliasing to remove the g prefix

As you might have noticed by now, these utilities have a “g” prefix for “GNU”, so you know you’re using GNU ftp and GNU telnet, and not the Mac’s built-in (BSD) ones… However, we don’t have any built-in ones anymore so we’ll remove the g prefix now.

Open a terminal if not already opened, and type in:

nano ~/.zprofile

Note that if you’re using bash instead of zsh, you’ll have to edit either .profile or .bashrc instead of .zprofile!

In a new line, enter these two lines:

alias telnet=gtelnet
alias ftp=gftp

Enter CTRL + X, then Y, then Enter.

Now close the terminal and open it again.

You should now be able to simply type in telnet or ftp to run those commands.

That’s all there is to it!