-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Swift 4 Programming Cookbook

The Linux operating system is a dominant force in the world of backend servers, so to be of any use for server-side development, Swift needs to be available on Linux. Fortunately, part of the open source release of Swift includes the Swift toolchain on Linux. Let's get it up and running with a "Hello World" program in Swift on Linux.
This recipe will use Ubuntu 16.04, as this is a very popular and widely used Linux distribution, and 16.04 is the latest Long-Term Support (LTS) version. Additionally, pre-built binaries of the Swift toolchain are provided for this distribution by the Swift open source team. As a Mac user, I have tested this process on an instance of Ubuntu, running in the VirtualBox virtualization environment, but there should be no difference when running on bare metal.
Let's install the Swift toolchain and run our first Swift code on Linux: