As a developer, changing platforms is not really a straightforward process.
Recently, I purchased a MacBook Air M1 as another development machine in my toolkit. However, before I could use it, I had to set it up for work.
And one of the first things that needed to be done before anything else was setting up PuTTY as accessing remote servers via the shell is one of the most frequent and important things that I do.
If you don’t already know, on the web front, I mainly work on Laravel, Tailwind CSS, VueJS, etc., and on the mobile front, I work primarily on Flutter.
When I jumped into setup PuTTY on my new MacBook Air, I realized that installing PuTTY on MacBook was not as simple as installing PuTTY on Windows is. So, I am jotting down the process below for anyone (or future me) who might need to see this.
Steps to install PuTTY on MacBook Air M1
- Install XCode from Apple App Store
- Install Command Line Tools for XCode for your version from here – https://developer.apple.com/download/all/
- Accept XCode Build license
- Download and install MacPorts from
- Download and install XQuartz
- Run selfupdate your system
- Fun fact, we haven’t even installed PuTTY yet. We have just been preparing the ground so far
- Install PuTTY via the terminal
So, now let’s go through each of the above-mentioned steps in detail.
Install XCode
To install some pre-requisites which in turn will allow us to install PuTTY on the MacBook Air M1, you will need to install XCode. You can download and install it from here – https://developer.apple.com/xcode/resources/
Install Command Line Tools for XCode
Once XCode installation completes successfully, we need to install what is called XCode Command Line Tools. This, however, for me, was easier said than done. I could find the correct link to the Command Line Tools for my version of XCode after spending a good amount of town. Surprisingly, it was not where it was supposed to be found but buried deep down on Apple’s site.
Here’s the link for the same – https://developer.apple.com/xcode/resources/
Accept XCode License
After installing XCode Command Line Tools, fire up your terminal and type the following command:
sudo xcodebuild -license
You should see something like this:
If you don’t see this, try the command given below instead:
sudo /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
Scroll to the bottom by hitting the spacebar and once you are there, to accept, type accept, and hit return.
Download and Install MacPorts
Next, head to this URL to download MacPorts to your local computer after choosing the correct OS version running on your system. Once downloaded, install it.
Install XQuartz
Once MacPorts is installed, we need to now install something called XQuartz. Head to this page and download the .dmg file from there. Once downloaded, install it on your system.
Run selfupdate
Open your terminal again and type the following command:
sudo port -v selfupdate
Once the selfupdate has run successfully, we are now ready to install PuTTY. Phew!
Install PuTTY
The installation actually is pretty simple but all the groundwork that needs to be done before actually installing it is a lot of work. Run the following command to install PuTTY:
sudo port install putty
Within a few seconds, the installation should be complete and PuTTY should be ready to use on your MacBook. To run the application, type the command below:
putty
I however have also created a shortcut on my desktop for easy access, as when I am working, I usually connect to multiple remote servers and have multiple instances of PuTTY running at any given time when I am working. It’s just easier to fire them up using a mouse click.
To create a shortcut, use the following command:
cp /opt/local/bin/putty ~/Desktop/PuTTY
That’s it!
8 thoughts on “How to install PuTTY on MacBook Air M1?”
Pingback: How to access phpMyAdmin to connect to AWS Ubuntu Instance?
Thank you so much Rajiv
Thank you 🙂
Pingback: How To Create Daily Automated Backups on an Amazon Lightsail Instance? - Rajiv Verma
Thank you!!
Welcome 🙂
Hi, I followed all the above steps but getting error: (putty:69538): Gtk-WARNING **: 15:26:14.374: cannot open display:
Hi Surekha,
I haven’t faced this issue but came across this possible suggestion that might help.
https://www.solveforum.com/forums/threads/solved-putty-gtk-warning-cannot-open-display.146155/
Cheers!