Install Swift

You have the choice between:

  • macOS and Ubuntu (14.04, 15.10 or 16.04)
  • on macOS between using Xcode or some plain editor (Emacs, vi, TextMate, etc)

If you have a Mac, the easiest is plain Xcode 8 with Swift 3.0.

Due to a bug in the Linux Swift 3.0.0 release you need to use Swift 3.0.1 or later on Linux.


Already have Xcode 8 installed? Make sure it is up to date. Need Xcode? Available for free at

Once you got it, head over to Download

Linux or macOS “Unix-style”

A manual tarball install of Swift is just fine, but swiftenv seems to be useful. Swiftenv installation steps:

git clone ~/.swiftenv
echo 'export SWIFTENV_ROOT="$HOME/.swiftenv"' >> ~/.bash_profile
echo 'export PATH="$SWIFTENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(swiftenv init -)"' >> ~/.bash_profile

Linux: Install dependencies

sudo apt-get install -y \
   libcurl4-openssl-dev \
   clang make git libicu52 \
   autoconf libtool pkg-config \
   libblocksruntime-dev \
   libkqueue-dev \
   libpthread-workqueue-dev \
   systemtap-sdt-dev \
   libbsd-dev libbsd0 libbsd0-dbg

Ubuntu 14.04 with Swift 3.0.1

swiftenv install

Ubuntu 15.10 with Swift 3.0.1

swiftenv install

Ubuntu 16.04 with Swift 3.0.1

swiftenv install

macOS with Swift 3.0

Install Xcode 8, available for free at

Test Swift Installation

Make sure it works, if the thing below doesn’t, won’t work either:

import Dispatch
let Q =
Q.async { print("Hello!"); }
import Glibc

Doesn’t work? Ask for help on Slack or mailinglist! It does work? Head on to Download