When I wrote my first line of Swift code I immediately had visions of being able to use this beautiful programming language for more than just iOS and OSX apps. Yesterday, Apple officially made Swift open source and my dreams came true.
This blog post will help you quickly get started writing your first application using the open source version of Swift on Linux.
Here We Go!
The Linux implementation of Swift currently only runs on Ubuntu 14.04 or Ubuntu 15.10. For our application, I’ll be using Ubuntu 14.04.3. If you don’t have an Ubuntu server sitting around you can always spin one up on your hosting provider of choice …
The Swift GitHub page shows you how to build Swift manually but you may want to start writing code without having to wrestle with Linux. Fortunately Apple provides snapshots that you can download and get running with a quickness.
Grab the URL of the Ubuntu 14.04 snapshot and then pull it down to your server using wget:
# Copy and paste the follow command to download Swift for Ubuntu wget https://swift.org/builds/ubuntu1404/swift-2.2-SNAPSHOT-2015-12-01-b/swift-2.2-SNAPSHOT-2015-12-01-b-ubuntu14.04.tar.gz #
Read the complete article here.